How do I hide Sundays in my Date Picker Widget

  • 416soclean
    Asked on January 11, 2017 at 10:54 PM

    Could you please let me know if there is a way to grey out/hide/disable Sundays from my Date Picker Widget?

    Alternatively if that cannot work - is there a way to provide a pop up message if Sunday is picked. 

    My form can be found at https://www.jotform.com//?formID=63118467835261

    Thank you again for all your assistance.  The JotForm support team is absolutely fabulous.

  • Charlie
    Replied on January 12, 2017 at 3:48 AM

    Hi,

    Thank you for the kind words.

    With regards to your question, unfortunately, the Date Picker widget does not have a functionality to disable some dates. However, I have a workaround that you can use, try adding this custom CSS code in your widget's CSS tab:

    tr > td:nth-child(1)  {

    pointer-events: none !important;

    opacity: 0.5 !important;

    background-color: #FFFFFF !important;

    }

    How do I hide Sundays in my Date Picker Widget Image 1 Screenshot 20

     

    We are basically using the style attribute pointer-events to prevent the user to select all the first days in each row, in this case, it's all the Sundays. However, I am not sure if this would work on all browsers, it is better to test it first. 

     

    If you are looking for a direct functionality, the default date field of JotForm allows you to disable dates in different ways. Here's a guide about it: https://www.jotform.com/help/337-How-to-Use-the-Date-Limits-Option. You can disable by date range or by days. 

     

    I hope that helps.

  • 416soclean
    Replied on January 12, 2017 at 9:27 PM

    Awesome and thank you.  Worked like a charm.  Also, I know that the JotForm date field allows you to leave it blank.  Can I do the same thing with the datepicker widget.  Right now it defaults to today's for each entry.

     

    Thank you again

  • amy
    Replied on January 13, 2017 at 2:07 AM

    Hi,

    On behalf of my colleague Charlie, you are most welcome. Unfortunately, we have no advanced options for our Date Picker widget like DateTime widget. I am escalating this issue to our developers as a feature request. But please note that I cannot promise whether it implements and cannot provide any time frame because of our developer's workloads.

    Unfortunately, we have no advanced options for our Date Picker widget like DateTime widget. I am escalating this issue to our developers as a feature request. But please note that I cannot promise whether it implements and cannot provide any time frame because of our developer's workloads.

    But please note that I cannot promise whether it implements and I cannot provide any time frame because of our developer's workloads.

    If we have any update for it, we'll inform you via this thread. 

    Thank you for your feedbacks and for choosing us.  

    If you have any other question, we'd be glad to help you. 

    Kindest Regards.