Check documentation for the latest version of dhtmlxSuite setInsensitiveRange DHTMLX Docs

setInsensitiveRange

sets a range of inactive dates in the calendar

void setInsensitiveRange(Date|string from,Date|string to);
fromDate|stringlimits the start date of the range to a particular date (in order not to limit the start date of the range, pass null)
toDate|stringlimits the end date of the range to a particular date (in order not to limit the end date of the range, pass null)
Details

Usage

// sets a range of inactive dates (inclusive)
myCalendar.setInsensitiveRange(from, to);
 
// sets a range of inactive dates from the specified date (inclusive)
myCalendar.setInsensitiveRange(from, null);
 
// sets a range of inactive dates before the specified date (inclusive)
myCalendar.setInsensitiveRange(null, to);


Examples

// all dates starting from July 08, 2011 will be dimmed
myCalendar.setInsensitiveRange("2011-07-08", null);
 
// the 1st of June 2011, the 2nd of June 2011 and the 3rd of June 2011 will be dimmed
myCalendar.setInsensitiveRange("2011-06-01", "2011-06-03");
 
// all dates until the 1st of June, 2011 (inclusive) will be dimmed
myCalendar.setInsensitiveRange(null, "2011-06-01");


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

See also
Back to top