Limit End Date selections based on a Start Date input?

  • Profile Image
    omaralraee
    Asked on July 01, 2018 at 03:42 AM

    My goal is to prevent the user from selecting an "End Date" input that precedes the "Start Date" input.

    For example, If the user selects 05-16-2018 for a Start Date input, the End Date input's available choices would begin on 05-16-2018 and all dates before 08-16-2016 would be unavailable.


    Can you help me please?

  • Profile Image
    DonaldHag
    Answered on July 01, 2018 at 05:58 AM

    To achieve this, make use of the dates difference widget. Refer to this guide on adding widgets to your forms. Once a date is selected as a start date, only dates after that can date can be selected as end dates.

    Here is a working example: https://form.jotform.com/81427461769971 

    Clone and use it as required. 

    For further assistance, do let us know.

  • Profile Image
    omaralraee
    Answered on July 01, 2018 at 11:07 AM

    Thanks for your response, but that's not helpful because in the data I need the dates to be single in the data submission.


    What should i do?

  • Profile Image
    Nik_C
    Answered on July 01, 2018 at 12:24 PM

    As a workaround, you can do this:

    1) Add two date fields:

    1530461964Screen Shot 2018-07-01 at 6.19

    2) And you can add one Text field that will act as error:

    1530462078Screen Shot 2018-07-01 at 6.21

    3) Add a condition that will show that Text field if Date field 2 is before Date field 1 and it will hide Submit button:

    1530462142Screen Shot 2018-07-01 at 6.16

    4) This is how it works:

    1530462180Screen Shot 2018-07-01 at 6.16

    You can check my test form as well: https://form.jotform.com/81814488751971

    Thank you!