Date Time Calender Trick to not select today nor tomorrow

  • retrophonic
    Asked on September 15, 2014 at 10:48 AM

    Having an issue with finding a solution with making the DateTime tool work for this particular form.
    I need the calender to work so that weekends can not be selected (which I've managed to do with the CSS code). But I need the calender to also make it so people can't select the current day or next day.
    I can't seen to find a solution from going through the forums.

  • Carina
    Replied on September 15, 2014 at 12:24 PM

    To hide today date you may inject the following css code:

    div.calendar tr.days td.today {

    visibility:hidden;

    }

    For the next day I believe it is not possible by using CSS, but perhaps you can set up a condition that if selected day is today+1 then show Text field with warning message.

    Date Time Calender Trick to not select today nor tomorrow Image 1 Screenshot 20

    You can test and clone the demo form:

    http://form.jotformpro.com/form/42574521369964?  

    Let us know if we can assist you further.

  • retrophonic
    Replied on September 16, 2014 at 3:00 AM

    Thanks Carina thats perfect!!

  • retrophonic
    Replied on September 16, 2014 at 6:55 AM

    Carina,

     

    This worked great. However putting in a new rule so also past dates can not be selected is not working.

    Date Time Calender Trick to not select today nor tomorrow Image 1 Screenshot 20

    I assume i'm doing the conditions wrong, but can't seem to get it to work.
    The +1 is working fine. Just the - dates are not.

  • Welvin Support Team Lead
    Replied on September 16, 2014 at 8:57 AM

    Instead of the conditional logic, you can disable the date in the datetime field:

    Date Time Calender Trick to not select today nor tomorrow Image 1 Screenshot 20

     

    Thank you!

  • retrophonic
    Replied on September 16, 2014 at 9:08 AM

    Fantastic!