Only allow to choose specific weekdays in calendar

  • Profile Image
    eiermann
    Asked on July 09, 2014 at 03: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!

  • Profile Image
    jedcadorna
    Answered on July 09, 2014 at 08: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.

  • Profile Image
    eiermann
    Answered on July 09, 2014 at 09:10 AM

    That sounds awesome! Thanks in advance!

  • Profile Image
    jedcadorna
    Answered on July 09, 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.

  • Profile Image
    eiermann
    Answered on July 10, 2014 at 12:15 PM

    AWESOME! Thank you so much!

  • Profile Image
    david
    Answered 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!