Is there a way to format Date objects as part of the #item#
template syntax?
If we are talking about datatable - yes, it is possible
In columns configuration you can use
columns:[
{ map:"(date)#item#", format:webix.i18n.dateFormatStr }
]
map attribute converts the string property item to the date object, and format applies necessary formatting. ( you can use your own format of course )
the same can be done through raw templating as well
var myformat = webix.date.dataToStr("%m - %d");
columns:[
{ temlate:function(obj){
var date = webix.i18n.dateFormatDate(obj.item);
return myformat(date);
}
}
]