How to add a conditional statement "TO date not earlier than FROM date"?

  • ourlander
    Asked on October 10, 2016 at 6:43 PM

     

    Hi

     

    Is it possible to only allow selection of dates in TO field that are later than FROM field?  

     

    https://form.jotformeu.com/62764573528365

     

    Thanks

  • Elton Support Team Lead
    Replied on October 11, 2016 at 12:16 AM

    Hi,

    That's possible when you use the DateTime tool. Unfortunately, this feature is not available with any of the date widgets.

    So if you'd like to use DateTime tool, here's how:

    1. Open your FROM date field properties and get the field ID number under the advanced tab > field details.

    How to add a conditional statement TO date not earlier than FROM date? Image 1 Screenshot 30

    2. Open your TO date field properties then enter the following in the limits tab > disable date ranges

    1960-01-01>{3}

    Where 3 is the field ID of your FROM date field.

    How to add a conditional statement TO date not earlier than FROM date? Image 2 Screenshot 41

    If you need further assistance, let us know.

    Regards!

  • ourlander
    Replied on October 12, 2016 at 9:38 PM

    Hi

    Thanks so much for the reply.  The reason we did not use that widget originally is because the layout look is ugly and there was a specific style requirement, is there a way we can make it look like ONE box instead of 3, even if its just a little hack of some kind?

     

    Thanks :)

  • Elton Support Team Lead
    Replied on October 13, 2016 at 12:01 AM

    Yes, the DateTime field can be switched into a single textbox field.

    To do that, in the DateTime properties, go to Options tab and enable Lite Mode

    How to add a conditional statement TO date not earlier than FROM date? Image 1 Screenshot 20

    Hope this helps!