Skip Navigation

[Resolved] Toolset Form – Date Field

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 months, 3 weeks ago.

Assisted by: Minesh.

Author
Posts
#2711427

Hey,

I want to disable Monday, Saturday and Sunday from the calendar on the date field. Can you please advise

#2711437

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to add the following code to custom JS section of your content template or forms:

jQuery(document).ready(function(){

jQuery("input[name='your-field-name']").datepicker({
  //beforeShowDay: $.datepicker.noWeekends
   beforeShowDay: function(date) {
        var day = date.getDay();
        return [(day !=0 && day != 5 && day != 6), ''];
    }
});

});

Where:
- Replace "your-field-name" with your original datepicker field name.

If that does not help, please share problem URL and admin access details and for what field you want to disable the days.