How to allow multiple date booking and restrict date selection

  • Mobicards
    Asked on October 5, 2022 at 2:30 PM


    I want to create a form that would book food orders in advance that will have the these functions.

    1. Allow user to choose multiple dates in advance. (Example: Oct, 9 Oct 20, Nov 4 etc...)
    2. Cut off time for each booking date. (Example: one day before Oct 9, one day before Oct 20, etc..)
    3. Exclude past dates from date choices.

    I have tried using the Date Picker widget but it does not allow me to pick multiple dates.

    Pls advise. Thanks


    Odi

  • Lesther JotForm Support
    Replied on October 5, 2022 at 4:46 PM

    Hello Mobicards,

    Thanks for reaching out to Jotform Support. The Date Picker and Appointment Field won't allow selecting multiple fields at once. The user has to submit the form again to choose a different schedule.

    Here's my sample form, you can clone it to have a copy and be able to view the entire setup. Here's our guide on How to Clone an Existing Form From a URL.

    1665002267 633deb1b8e10e  Screenshot 10

    I've added another Date Picker field to detect the current date.

    1665002349 633deb6d4ee87  Screenshot 21

    A Form Calculation widget to calculate the date difference.

    1665002565 633dec4534a31  Screenshot 32

    Added a Show/Hide Field condition logic to Show the Paragraph field that contains the message that the Cut-off time is 1 day before the selected date. It will hide the rest of the field as well.

    1. To add the condition, click on the Settings tab and the Condition tab on the left.
    2. Select the Show/Hide Field Condition.
    3. Follow the conditional statement below.1665002636 633dec8c0a3fe  Screenshot 43

    Let us know if you have any other questions.

  • Mobicards
    Replied on October 7, 2022 at 10:40 AM

    Perfect. Is it possible to refine cutoff based on time? Say for example 10am?

  • Durand_C
    Replied on October 7, 2022 at 11:20 AM

    Hello Odi, 

    Thanks for getting back to us. Yes, it is possible to achieve that by turning the Time option ON. Let walk you through it:

    • Click on the Gear icon
    • Select the Time tab. And turn it ON 

    1665156007 634043a75c67c time Screenshot 10Let us know if you have any other questions.