Make sure the end date isn't before the start date

  • FCMG1996
    Asked on May 28, 2019 at 5:35 PM

    Please forward to Kevin G - That is what we are doing and still can not get it to post to Google calendar - please take a look at our latest form - 

    : https://form.jotform.com/91156966595170

  • Elton Support Team Lead
    Replied on May 28, 2019 at 6:41 PM

    The workaround is to get the difference between the two dates.

    If the difference is less than zero, that means the END DATE is before the START DATE.

    You can then perform condition out of the result.

    Example, you can show a text message that END DATE can't be before the START DATE. You can also disable the submit button at the same time to prevent submission.

    Here's how:

    1. Use 2 Date Pickers with Time Enabled.

    Make sure the end date isnt before the start date Image 1 Screenshot 70

    2. Add Form Calculation Widget and then get their difference (End Date - Start Date)

    Make sure the end date isnt before the start date Image 1 Screenshot 70

    3. Add a Text for the custom message.

    Make sure the end date isnt before the start date Image 3 Screenshot 92

    4. Create Show/Hide Condition that shows the custom message when the calculation (date difference) is less then 0. This means the End Date is before the Start Date.

    Example:

    Make sure the end date isnt before the start date Image 4 Screenshot 103

    5. Create another condition this time on Enable/Require Field that Disables the Submit button with the same IF statement.

    Make sure the end date isnt before the start date Image 5 Screenshot 114

    Make sure the end date isnt before the start date Image 6 Screenshot 125

    Let us know if you need further assistance.