allows disabling some date intervals, day labels are dimmed

function disabledDates;


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

Related samples


The function passed to the method 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).

See also
Change log

added in v6.4

Back to top