DHTMLX Docs & Samples Explorer

setInsensitiveRange(date)

Sets a range of insensitive(inactive) date(s) in calendar. Other dates will be active.

Parameters:

  • date - the date(s) you want to set as inactive.
    Should be specified in one of the following formats: '%Y-%m-%d' or '%Y.%m.%d'.

    setInsensitiveRange("2011-07-08",null);// all dates starting from July 08, 2011 will be dimmed. Dates until July 08, 2011 will be active.

Description:

There are 3 different ways to call this method:

//sets a range of inactive(dimmed) dates (inclusive). Dates out of this range are active.
   myCalendar.setInsensitiveRange(from, to);
//sets a range of inactive dates from the specified date (inclusive). Dates until the specified date are active.
   myCalendar.setInsensitiveRange(from, null);
//sets a range of inactive dates until the specified date (inclusive). Dates after the specifies date are active.
   myCalendar.setInsensitiveRange(null, to);

where 'from', 'to' parameters can be either an object or a string.

For example:

//just 1st June 2011, 2nd June 2011 and 3rd June 2011 will be dimmed. All the other dates will be active.
   myCalendar.setInsensitiveRange("2011-06-01", "2011-06-03");
//all dates until 1st June 2011 (inclusive) will be dimmed. Dates after 1st June 2011 will be active.
   myCalendar.setInsensitiveRange(null,"2011-06-01" );

See also: