How to Use the Date Limits Option

July 12, 2021

Would you like to set limits on your Date Picker Field? Example, you only want to allow your users to enter dates that fall on a weekend. That is now possible with the new advanced options added to the default Date Picker Field.

First, add the DATE PICKER field to your form then click the GEAR icon.

In the properties section, go to the LIMITS tab.

And here’s the complete list of options that you can use on disabling dates:

1. Past & Future

Check the PAST option if you want to allow users to select past dates, same goes with the FUTURE option, check it if you want to allow future dates to be selected.

2. Days of the week

 

Unchecking a day will disable all of the same days in the calendar. You can uncheck which day of the week you don’t want your users to select in the date field. So, to only allow weekdays, uncheck Saturday and Sunday.

3. Start & End Date

Disable dates within the range you set up. This will only allow selection between the dates you selected.

4. Disable Custom Dates

Here you can disable specific dates. The correct format is YYYY-MM-DD but you may also use MM-DD or just DD.

Examples:

2017-07-30 – Disable July 30, 2017

07-01 – Disable July 1 each year

15 – Disable the 15th of each month 

5. Disable Date Ranges

This is similar to the “Start & End Date“, but this allows you to set multiple date ranges to disable. This is also a good way to filter out invalid dates. Example, I would like to force users not to enter invalid years like “192”, or years that are way in the past “1900” or “1720”. What I did is set the date range like this: 0000-01-01>2000-01-01 so users can only select dates from 2000-01-01 onward.

You can also use Dynamic Date Selections. You can achieve this by utilizing the Start & End Date limit and use today+x (where x is the number of days to be added to today).

Say, you’re working on a booking form and would like to limit the booking dates to be at least 1 week after submission, and at the same time, you want to limit the booking window for just 1 week. For this to happen, you need to set the Start Date to today+7 (1 week after) and the End Date to today+13 (a window of just 1 week).

Here’s the result, given that today is July 16:

Comments and suggestions are welcome below. If you have a question, post it in our Support Forum so we can assist you.

Was this guide helpful?
Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comments: