returns true if date is a holiday
date | object | date object |
boolean | true if date is a holiday |
webix.ui({
view:"calendar",
date:new Date(2012,3,16),
events:webix.Date.isHoliday
});
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