sets an array of icons in the calendar or hides them
webix.ui({
view:"calendar",
icons: [
{
template: function(){
return "<span class='webix_cal_icon_today webix_cal_icon'>"
+webix.i18n.calendar.today
+"</span>";
},
on_click:{
"webix_cal_icon_today": function(){
this.setValue(new Date());
this.callEvent("onTodaySet",[this.getSelectedDate()]);
}
}
},
{
template: function(){
return "<span class='webix_cal_icon_clear webix_cal_icon'>"
+webix.i18n.calendar.clear
+"</span>";
},
on_click:{
"webix_cal_icon_clear": function(){
this.setValue("");
this.callEvent("onDateClear",[this.getSelectedDate()]);
}
}
}
]
});
To hide "Today" and "Clear" icons in the calendar, set the parameter to false:
webix.ui({
view:"calendar",
icon:false,
...
});
As an object the parameter redefines buttons:
webix.ui({
view: "calendar",
icons: [
template: function(){
return "<span class='my_button'>My Button</span>";
},
on_click:{
"my_button": function(){
alert("Button is clicked")
}
}
]
});
Back to top