cancel
Showing results for 
Search instead for 
Did you mean: 
lojncn
Nintex Newbie

Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Hi,

Using Nintex Form, how can i stop user to select a past date in a calendar control?

 

Building a task form, it does not make sense to allow user to pick a past date as due date for the task.

Anyway I can grey out the date before today?

Or any workaround?

 

thanks,

Jun

Labels: (2)
Tags (1)
0 Kudos
Reply
6 Replies
barryandersonuk
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Hi Jun.

You can do this by associating a validation rule with the date form control.  The rule required will be along the lines of the following:

dateDiffDays(Current Date, FormField) < 0

For a more detailed article please refer to How to complete Date Validation using Nintex Forms 2013 Validation Rules.

Thanks,

Barry.

0 Kudos
Reply
thomas_xu
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Hi Jun.

If you simply want to stop user from entering a past day, you should be able to achieve this by configuring the validation of that datetime control as follows

Thomas

0 Kudos
Reply
cgb
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Another approach would be to create a Validation Rule for the control.  This example as described by Thomas is much easier to implement - I have used his approach on several forms.

0 Kudos
Reply
lojncn
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Hi Thomas,

Thanks for your reply. The solution you suggested works, but it seems the validation only runs after user clicked 'Save'.

Is it possible to grey out the dates before today in the control, which will stop user error in the first place?

Personally I think it will be more user friendly.

Regards,

Jun

0 Kudos
Reply
lojncn
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

Hi Barry,

Thanks for your suggestion.

I tried to follow the steps in the link you posted, but somehow the rule only works under Formatting.

When under Validation, the rule is just bypassed, Do not know what I have done incorrectly.

Regards,

Jun

0 Kudos
Reply
thomas_xu
Nintex Newbie

Re: Hi, in Nintex Form, how can i stop user to select a past date in a calendar control? thanks

It seems possible with Jquery datepicker although i have not tried it myself yet.

http://stackoverflow.com/questions/8356358/jquery-date-picker-disable-past-dates

0 Kudos
Reply