Date Time Calender Trick to not select today nor tomorrow

  • Profile Image
    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.

  • Profile Image
    Carina
    Answered 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.

    You can test and clone the demo form:

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

    Let us know if we can assist you further.

  • Profile Image
    retrophonic
    Answered on September 16, 2014 at 03:00 AM

    Thanks Carina thats perfect!!

  • Profile Image
    retrophonic
    Answered on September 16, 2014 at 06:55 AM

    Carina,

     

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

    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.

  • Profile Image
    Welvin
    Answered on September 16, 2014 at 08:57 AM

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

     

    Thank you!

  • Profile Image
    retrophonic
    Answered on September 16, 2014 at 09:08 AM

    Fantastic!