isHoliday

returns true if date is a holiday

boolean isHoliday(object date);

Parameters

dateobjectdate object

Returns

booleantrue if date is a holiday

Example

webix.ui({
    view:"calendar",
    date:new Date(2012,3,16),
    events:webix.Date.isHoliday
});

Related samples

Details

If true, the method sets webix_cal_event CSS class to the calendar item (red highlighting).

By default returns true for all Sundays and Saturdays (0 and 6). Redefine it if you wish your own sets of holidays.

The following code helps apply holiday highlighting to Fridays, Saturdays and Sundays.

webix.Date.isHoliday = function(day){ 
    day = day.getDay();
    if (day === 0 || day==5 || day == 6) return "webix_cal_event"; 
}

Related sample:  Custom Holidays in Calendar

See also
  • Articles
  • Back to top