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

  • 2 December 2015
  • 6 replies
  • 13 views

Badge +1

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


6 replies

Badge +4

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.

Badge +5

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

148698_pastedImage_1.png

148699_pastedImage_2.png

Thomas

Badge +3

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.

Badge +1

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

Badge +1

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

Badge +5

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

Reply