Skip Navigation

[Resolved] Datepicker disable months

This support ticket is created 6 years, 7 months ago. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Anonymous 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#570366

Anonymous

Hi.
I have a datepicker in a page.
I want to disable by default the months from may to december.

I found out this code:

jQuery(function($){
  ​$("#someid").datepicker({
    beforeShowDay: function(date) {
      var day = date.getDay();
      return [(day != 1 && day != 2)];
    }
  })​​​​​;​
});

I think it could work if i use beforeShowMonth, var month, date.getMonth, etc

What I don't know, is where to put the code into my website in order to work on that datepicker, with the id #someid (for example).

#570396

Where is the datepicker - in a custom search View, or in a CRED form?

#572814

Anonymous

Ok

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.