Check documentation for the latest version of dhtmlxSuite setSensitiveRange DHTMLX Docs

setSensitiveRange

sets a range of active dates in the calendar

void setSensitiveRange(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 active dates from the specified date (inclusive)
myCalendar.setSensitiveRange(from, null);
 
// sets a range of active dates before the specified date (inclusive)
myCalendar.setInsensitiveRange(null, to);
 
// sets a range of active dates (inclusive)
myCalendar.setSensitiveRange(from, to);
 
// sets a range of active dates out of the specified dates
myCalendar.setInsensitiveRange(until, from);


Examples

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


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

Back to top