defines the data scheme for the Comments widget
webix.ui({
view:"comments",
scheme:{
$init:(obj) => {
if(obj.date)
obj.date = webix.i18n.parseFormatDate(obj.date);
}
},
currentUser:2,
data:[
{
id:1, user_id:1, date:"2018-06-10 18:45",
text:"Let's deal with half of the points in the plan without further delays."
},
{ id:2, user_id:2, date:"2018-06-10 19:40", text:"Yes, let's do it." }
],
users:[
{ id:1, value:"Corvo Attano", image:"./common/imgs/corvo.jpg" },
{ id:2, value:"Daisy Fitzroy", image:"./common/imgs/daisy.jpg" }
]
});
Comments widget features the default scheme $init handler, in which in it stringifies incoming dates according to parseFormat. If you define a custom $init handler, it will override the default one.