The “Restrict Dates” feature allows you to set limitations on date fields within your form. This feature is useful when you want to restrict users from selecting certain dates, such as past dates or specific ranges.
With this you can improve the user experience and ensure that users select valid dates within your specified criteria. Whether it’s preventing users from selecting past dates, limiting future date selections, or defining a specific date range, this feature adds flexibility and control to your form design.
Getting started
Ensure you installed and activated the plugin.
Restrict dates settings
How to add restricted date fields?
Choose type “Restrict date”.
How to set specified range days?
Specify a specific range which will be the earliest (Min) and latest dates (Max) selectable in the date field.
- Step 1: At Min, choose type “Set date” to designate the day you want or “Current date” to designate Min is today.
- Step 2: After you choose “Set date”, Min Date Pick is displayed and you will choose the min date.
- Step 3: At Max, choose type “Set date” to designate the day you want or “Current date” to designate Max date is today.
- Step 4: After you choose “Set date”, Max Date Pick is displayed and you will choose the max date.
For example, at check-in date field, we set min date is 2023-08-24 and max date is 2023-08-30. Please see a preview:
How to link two date pickers?
If I select an end date input, the start date input should be before the end date.
- Step 1: Set min/max date.
- Step 2: Copy ID of Min date and paste to Link Min Field of Max date. Copy ID of Max date and paste to Link Max Field of Min date.
- Step 3: Save and have a look.
If we choose check-out date is 2023-08-27, check-in date only choose from 2023-08-24 to 2023-08-27.
How to add an exception?
Input the date in the box as the format:
E.g:
We create an appointment schedule from 08-24 to 08-30. Add exception is 2023-08-28.
Have a preview: we can not choose 2023-08-28.
Days of week
This setting allows you to restrict which dates are selectable based on the days of the week.
E.g: We restrict Sat and Sun.
That’s it! We hope this article helped you find out how to use Restrict dates with your Elementor forms.