Skip to main content

disabledDates

Optional. Allows disabling some date intervals, day labels are dimmed

disabledDates?: (date: Date) => boolean;

Parameters:

The function receives one parameter:

  • date: Date - a date object

and must return a boolean value to define whether a passed date should be blocked (if true, the date is inactive).

Example

const calendar = new dhx.Calendar("calendar_container", {
disabledDates: function(date) {
const disabled = {
0: true,
1: true,
2: false,
3: false,
4: false,
5: false,
6: true
}
return disabled[date.getDay()];
}
});

Change log:

added in v6.4