What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to validate two dates using conditions?

    Asked by traveldiunsa on February 29, 2016 at 01:30 PM

    Hi, I have a form where the user select Dates for Flight Quotes.

    I have 2 calendar pickers, both are configured to not select past dates but I need to apply condition to the second based only on Dates After the First Picked Date.

     

    So I can avoid receiving this kind of error:

     

    I explore the Conditions Options but not find like a "After Picked Date" or something similar

     

    Thanks a lot!

    Page URL:
    http://traveldiunsa.com/boletos-aereos

    JotForm uploads png find
  • Profile Image
    JotForm Support

    Answered by Kevin_G on February 29, 2016 at 04:16 PM

    Please follow these steps:

    1. Add a "Form Calculation Widget" to your form.

    2. In the widget add this subtraction, "Fecha de Salida" - "Fecha de Regreso".

    3. Add a text to indicate your users that "Fecha de Regreso" could not be less than the "Fecha de Salida". 

    4. Set the Form Calculation and the text as hidden.

    5. Now add this conditions, total is the result of the subtraction, if it is less than 0 then it will show the message and will hide the submit button.

    Take a look on my sample form: https://form.jotform.com/53097140976967.

    Feel free to clone it.

    Hope this helps.

  • Profile Image

    Answered by traveldiunsa on March 01, 2016 at 02:58 PM

    ¡Thanks for the help!
    I just apply the changes in http://traveldiunsa.com/boletos-aereos/  
    I knew you would have a tweak to make it happen.

  • Profile Image
    JotForm Support

    Answered by jonathan on March 01, 2016 at 04:29 PM

    Can we assume that all is good now?

    I checked the form http://www.jotform.co/form/50686448502863   on your website, and I see the condition working similar to the solution suggested by our colleague.

    Let us know if there is more we can help you with.

    Thanks.

  • Profile Image

    Answered by traveldiunsa on March 01, 2016 at 04:31 PM

    Yes, you can mark it Solved, thanks for the help!

  • Profile Image
    JotForm Support

    Answered by jonathan on March 01, 2016 at 05:34 PM

    Thank you for the confirmation. On behalf of my colleague you are welcome as well :-)

    Cheers