Check documentation for the latest version of dhtmlxSuite setInsensitiveDays DHTMLX Docs

setInsensitiveDays

disables specified dates in the calendar

void setInsensitiveDays(Date|string|array date);
dateDate|string|arraydates you want to set as inactive

Example

// disables a single day 
myCalendar.setInsensitiveDays("2011-06-01");
 
// or
myCalendar.setInsensitiveDays(new Date(2011,5,1));
 
// disables several days
myCalendar.setInsensitiveDays(["2011-06-01,2011-06-02,2011-06-03"]);
 
// or
myCalendar.setInsensitiveDays(["2011-06-01","2011-06-02","2011-06-03"]);
 
// or
myCalendar.setInsensitiveDays([new Date(2011,5,1), new Date(2011,5,2)]);
 
// July-10-2011, July-11-2011, July-17-2011, July-18-2011 will be dimmed
myCalendar.setInsensitiveDays(["2011-07-10","2011-07-11","2011-07-17","2011-07-18"]);

Details

If the date is set as a string, it should correspond to the format specified by the setDateFormat() method.

To optimize the work of the calendar in case you have several dates, we recommend you to call the method once and pass the whole array into it, instead of calling the method for each element of the array.

Back to top