Condition on date field is not working

  • Mani Sohal
    Asked on June 1, 2017 at 4:35 PM

    Hi,

     

    I have a jot form on platinumsuites.ca and it was working fine before the update. It has a Arriving date and Departure Date filed and we don't want clients to select less than three days starting from the date they selected for arrival Date. Departure Date= Arrival Date +3. It used to work but now the conditions are not working and anybody can select lesser than three days. 

     

    Website URL : http://platinumsuites.ca/

  • David JotForm Support
    Replied on June 1, 2017 at 6:49 PM

    I checked your form and the condition appears to be working:

    Condition on date field is not working Image 1 Screenshot 20

    No matter what I set it to, it always was arrival date+3 for departure date.  Is that not the case on your end?  Let us know and we will be happy to have another look.

  • manisohal
    Replied on June 7, 2017 at 7:19 AM

    Hi

     

    But I can still select future arriving date and past departure date. I should not be able to select Departure date<arrival date+3. But i can do so now.Condition on date field is not working Image 1 Screenshot 20

  • Nik_C
    Replied on June 7, 2017 at 9:43 AM

    I checked your form and I see what you meant, when the arriving date is selected and departure date is added you can still select dates in the "past" in departure date.

    Please allow me some time to check this issue further and I will get back to you once I have more information.

    Thank you!

  • Nik_C
    Replied on June 7, 2017 at 2:53 PM

    Thank you for your patience.

    I'm not sure if such condition worked before since when you're selecting second date field, that action is not triggering condition so you're able to change the field.

    Anyhow, a workaround I found is to insert one more hidden date field:

    Condition on date field is not working Image 1 Screenshot 30

    And then I created two more conditions, one that will copy the same + 3 days to temp field. And another one that will check if a user tried to select a day that is in the past of +3 from chosen (condition1):

    Condition on date field is not working Image 2 Screenshot 41

    And that will work, please check my test form: https://form.jotformpro.com/71575275087970

    If a user tries to select a day in past (less than +3 days) it will revert to chosen day+3. 

    Please check and let us know if that could work for you.

    Thank you!