DHTMLX Docs & Samples Explorer

setInsensitiveDays(date)

Disables certain date(s) in calendar. Other dates will be active.

Parameters:

  • date - the date(s) you want to set as inactive.
    Date object or a string in the current format (or array with dates). If the date is set as a string, it should correspond to the format specified with the setDateFormat(format) method.

    // July 10, 2011, July 11, 2011, July 17, 2011, July 18, 2011 will be dimmed. All other dates will be active.
    setInsensitiveDays(["2011-07-10","2011-07-11","2011-07-17","2011-07-18"]);

Description:

There are several ways to call the method:

// 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), new Date(2011,5,3)]);

See also: