Steps

1. Install GP Limit Dates (via Gravity Perks)

GP Limit Dates is available via Gravity Perks. Install Gravity Perks and then you can install GP Limit Dates (and 30 other Gravity Forms plugins) right from your WordPress admin.

2. Add two Date fields to your form.

Under the Advanced Fields field group, click the “Date” field button to add a Date field. After the first has been added, click the button again to add a second.

You should now have two Date fields on your form. I’ve named mine “Start Date” and “End Date”.

3. Set “Minimum Date” on second Date field.

Click on the second Date field to open the field settings. Navigate to the “Perks” tab.

Set the “Minimum Date” setting to the “Start Field”.

That’s it! Whenever a date is selected in the Start Date field, the minimum date in the End Date field will be adjusted based on the selected date.

Modifying the Minimum Date

In some cases, you may want to enforce a minimum range between the start and end dates. You can use the “Date Modifier” input (next to the “Minimum Date” select) to modify the selected date before it is set as the minimum date.

For example, if you would like to enforce a two-night stay at your hotel, you could increase the selected date by +2 days. This means if the first date selected was Jan 13, 2015 the minimum date in the second field would be Jan 15, 2015.

4. (optional) Configure “Maximum Date” on first Date field.

If you’d like, you can take this a step further and set the “Maximum Date” on the first Date field to the selected date from the second Date field. This can help a user fully understand the connection between the two Date fields.

Did this resource help you do something awesome with Gravity Forms? Then you'll absolutely love Gravity Perks;
a suite of 29+ essential add-ons for Gravity Forms with support you can count on.

Comments

Hello.
I’ve got a form with start date and end date.
I’d like to use “exceptions” as no-services days : theses dates can’t be used as start or end dates.
Is it possible to share exceptions between the two calendars ?
Thanks !

I have a product (skip hire) where the user has to selects two dates: delivery and then collection. With this add-on, is it possible to limit the second date picker (collection date) to a maximum of 2 weeks after the date selected in the first date field (delivery date)?