defines a template for a calendar day cell
view:"calendar",
dayTemplate: function(date){
var html = "<div class='day'>"+date.getDate()+"</div>";
if(date.getDay() === 5){
html += "<div class='day_marker'></div>";
}
return html;
}
The default template displays a date without any extra styling.
To enhance the accessibility of the Calendar component it is possible to define a visible template alongside with the ARIA labels that will be announced by screen reading software.
For these means you need to return an object with the following properties:
view:"calendar",
dayTemplate: function(day){
var weekend = (day.getDay() === 6 || day.getDay() === 0);
return {
text:day.getDate(),
aria:"Navigated to: "+webix.Date.dateToStr("%d %F %Y")(day)
+(weekend?". It's a day off!":".");
};
};