Saltar navegación

[Resuelto] Toolset Form – Date Field

This support ticket is created hace 9 meses. There's a good chance that you are reading advice that it now obsolete.

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)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh hace 9 meses.

Asistido por: Minesh.

Autor
Mensajes
#2711427

Hey,

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

#2711437

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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.