Hi.
In response from server (which function return Json(some_records, JsonRequestBehavior.AllowGet)) I have field:
TestDate: "2015-03-11T02:10:27.8278798+05:00"
If I don't specify 'schema' for kendo-grid then TestDate colimn's cells displays string values 'as is'. There not enable date formating, sorting and filtering, of course.
But when I specify
schema : {
model: {
fields: {
TestDate: { type: 'date' }
}
}
}
all column's cells values become empty.
Why is that?
I've tried specify format and parseFormats - it's not working.
Template "#= kendo.parseDate(TestDate, 'yyyy-MM-ddTHH:mm:ss.fffZ') #" for column returns 'null' everytime (with any parse format I set).
I get example here http://jsfiddle.net/OnaBai/Ahq6s/ and input "2015-03-11T02:10:27.8278798+05:00" in date field.. and it works!
After hours I come up with a solution - specify template "#= new Date(TestDate).format('dd.mm.yyyy') #".
Huray, my TestDate is displayed! But only if I don't specify TestDate type in schema.model.fields. And without that I don't have date options in filtering menu, for example.
What I do wrong?
P.S. Oh, and one more thing. In demo http://demos.telerik.com/kendo-ui/grid/filter-row we see 4 column specified in code and only 3 columns in visual grid.
Guess, which column is not displayed? Yup, 'OrderDate' with type: 'date' in schema.model.fields description. Same result in Dojo.
I don't know what to think.
P.P.S. Sorry for my English.
In response from server (which function return Json(some_records, JsonRequestBehavior.AllowGet)) I have field:
TestDate: "2015-03-11T02:10:27.8278798+05:00"
If I don't specify 'schema' for kendo-grid then TestDate colimn's cells displays string values 'as is'. There not enable date formating, sorting and filtering, of course.
But when I specify
schema : {
model: {
fields: {
TestDate: { type: 'date' }
}
}
}
all column's cells values become empty.
Why is that?
I've tried specify format and parseFormats - it's not working.
Template "#= kendo.parseDate(TestDate, 'yyyy-MM-ddTHH:mm:ss.fffZ') #" for column returns 'null' everytime (with any parse format I set).
I get example here http://jsfiddle.net/OnaBai/Ahq6s/ and input "2015-03-11T02:10:27.8278798+05:00" in date field.. and it works!
After hours I come up with a solution - specify template "#= new Date(TestDate).format('dd.mm.yyyy') #".
Huray, my TestDate is displayed! But only if I don't specify TestDate type in schema.model.fields. And without that I don't have date options in filtering menu, for example.
What I do wrong?
P.S. Oh, and one more thing. In demo http://demos.telerik.com/kendo-ui/grid/filter-row we see 4 column specified in code and only 3 columns in visual grid.
Guess, which column is not displayed? Yup, 'OrderDate' with type: 'date' in schema.model.fields description. Same result in Dojo.
I don't know what to think.
P.P.S. Sorry for my English.