问题
I've got a Kendo ui grid within my web application. I can directly create a new dataset with popup editing. A given field is usable as datePicker.
My Problem is, if I logon to my webapplication @ 8 a.m. and click on the create data button in the afternoon the field is populated with 8 a.m.
how can I force the datePicker to refresh, if I call the create function from the toolbar of my grid?
回答1:
Okay I found the solution. May it will help someone else out. You can use the edit function from the grid itself, to set the value of a given column:
edit: function(e){
if (e.model.isNew()) {
e.model.set("jtrDate", new Date());
}
}
As in my example, my column Name is jtrDate.
Grid Edit Function
来源:https://stackoverflow.com/questions/22245803/kendoui-grid-popup-edit-with-datepicker-plugin-not-updating-its-time-value