Set up available dates for end date 3 days after the current date

  • DMG_Operations
    Asked on March 18, 2025 at 4:31 PM

    Hi,

    We have created a form called Guest Parking Request Form. There are two dates that were created using the date picker - a start date and an end date. We would like to make it so that when you select a date in the 'Start Date,' the 'End Date' is a maximum of 3 days after that current date. As an example, today is March 18th. If this was the start date, the maximum end date would be 3.21.2025. You could select 3.19 or 3.20, but anything beyond that would be blacked out. Are you able to assist me with this?

  • Lorenz JotForm Support
    Replied on March 18, 2025 at 9:24 PM

    Hi DMG_Operations,

    Thanks for reaching out to Jotform Support. I'll need a bit of time to look into this, and I'll be back as soon as I can.

    Thanks for your patience and understanding, we appreciate it.

  • Lorenz JotForm Support
    Replied on March 19, 2025 at 9:13 AM

    Hi DMG_Operations,

    To clarify, will the start date will always be the current date? If so, then let me walk you through on how to achieve this:

    1. In Form Builder, select the Request End Date field, and click on its Gear icon.

    2. In the right panel, go to the Limits tab.

    3. Now, scroll down to the Start & End Date section.

    4. Finally, set up the start date to today+1 and end date to today+2

    Set up available dates for end date 3 days after the current date Image 1 Screenshot 20 Give it a try and let us know if you need any more help.

  • Jonathan
    Replied on March 19, 2025 at 1:15 PM

    Hi Lorenz,

    The start date would NOT always be the current date, unfortunately. The end date will just never be more than +3 from the date they originally select.

  • Dayron JotForm Support
    Replied on March 19, 2025 at 2:48 PM

    Hi DMG_Operations,

    We can archive this with using Conditions Logic. We need first to add another Date Picker widget, and we will name it Calculate, let me show you how:

    1. In Form Builder, click on the Add Element menu on the left side of the page.
    2. Under the Widgets tabdrag and drop the Date Picker widget into your form, or just click on it to add.

    Set up available dates for end date 3 days after the current date Image 1 Screenshot 70 If you want, you can also add a Paragraph field the same way. This time, instead of selecting Date Picker, select the Paragraph field.

    Set up available dates for end date 3 days after the current date Image 2 Screenshot 81 We can then add a message in the field that will be displayed in case the user selects a date out of range, and we can hide the field.

    After this, we can now add the conditions, let me show you how:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on the Settings.

    2. In the menu on the left side of the page, click on Conditions, and then Add Condition.

    Set up available dates for end date 3 days after the current date Image 3 Screenshot 92 We will use the Show/Hide Field and the Update/Calculate Field conditions.

    Set up the conditions as you see below and click on Save:

    For the Show/Hide Field:

    Set up available dates for end date 3 days after the current date Image 4 Screenshot 103

    And for the Update/Calculate Field, do this:

    Set up available dates for end date 3 days after the current date Image 5 Screenshot 114

    Check out the screencast below to see my results:

    Set up available dates for end date 3 days after the current date Image 6 Screenshot 125 I have also included here, my demo form, in case you want to check it out.

    Give it a try and let us know if you need any help.

  • DMG_Operations
    Replied on March 19, 2025 at 2:57 PM

    This worked, thanks a ton!