Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Settings for Date Picker control

Is there a way to only allow the 2nd and 4th Tuesdays of each month to be selected in the Date Picker control? We need to select a date for a meeting in a form and those days are the only ones that should be available for the user. Currently we are using the example from Article 664, but that has ALL Tuesdays enabled.

Here's an example of what I am trying to do, from https://stackoverflow.com/questions/71671981/how-to-disable-all-days-in-month-except-2nd-and-4th-weeks-thursday-in-kendodate, but I can't figure out how to include it in a NITRO form.

If this isn't possible, is there a way to use a Calendar/Event list to feed the enabled dates to the Date Picker? Are other kendoDatePicker options available?

Thanks for the help!

Uploaded files:
  • 2023-01-20-09_46_08-KendoDatePicker.png

Hi @pf-amalin,

We have updated the article to include this case. In use case 5 we have added another script example for only allowing 2nd and 4th Tuesday of the month.

Use ‘Form Event Actions’ Feature Of NITRO Forms To Add Custom Functionality – II

Thank you,
Crow Canyon Team.

Thank you, that's exactly what I needed!

But I think I found a bug: if the week starts on Monday or Tuesday, it selects 3 & 5 rather than 2 & 4. The other days select correctly.

Thank you for the feedback. The script may need some adjustment as starting day of the week could be different. For some it may be Sunday and others it may be Monday etc. Due to this week number calculation can give different results.

We adapted the script from the link you provided. Please refer this link for more options for week number calculation and change the script accordingly.

https://stackoverflow.com/questions/3280323/get-week-of-the-month/36036273#36036273

Thank you
Crow Canyon Team.