returns true if date is a holiday
date | Date | 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 (highlighting depends on the skin in use).
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