Only allow to choose specific weekdays in calendar

  • eiermann
    Asked on July 9, 2014 at 3:16 AM

    Hi there, 

     

    we offer tours that always start on Monday and Thursday every week.

    Is there a way to tell the calendar that only Mondays or Thursdays can be selected as departure date?

     

    Link: Komodo Cruise

     

    Thanks for your help in advance!

  • jedcadorna
    Replied on July 9, 2014 at 8:51 AM

    Hello,

    Thank you for contacting us.

    I was searching our widget gallery page, but I don't see any widget that has this feature even in the form builder I don't see anything that would allow you to do this. However this can be done by injecting a custom CSS to hide the other choices or by creating a custom script  to disable selection which is not Monday or Thursday. 

    I'll try to make a sample and get back to you once done. Thank you for your patience.

  • eiermann
    Replied on July 9, 2014 at 9:10 AM

    That sounds awesome! Thanks in advance!

  • jedcadorna
    Replied on July 9, 2014 at 12:43 PM

    As promised here is the sample form http://form.jotformpro.com/form/41894909846978. Only Monday and Thursday can be selected in the calendar. 

    Here is the custom CSS that I have used.

    .days td:last-child,
    .days td:nth-child(2),

    .days td:nth-child(3),
    .days td:nth-child(5),
    .days td:nth-child(6){
    visibility: hidden;
    }

    If there's anything else that we could help you with don't hesitate to contact us back.

  • eiermann
    Replied on July 10, 2014 at 12:15 PM

    AWESOME! Thank you so much!

  • David JotForm Support
    Replied on July 10, 2014 at 12:43 PM

    Hi,

    I am glad my colleague was able to create a solution for you.  Please let us know if you have any other questions and we will be happy to help.

    Thank you for using Jotform!