In my grid I have a date column with the following parameters:
update: {
url: ROOT+"user/update-user",
type: "POST"
}
columns: [
{...},
{
field: "DoB",
width: 68,
title: "DoB",
format: "{0:dd/MM/yyyy}",
template: '#= kendo.toString(DoB,"dd/MM/yyyy") #'
},
{...}
datasource: {
...
schema: {
model: {
DoB: {type: "date", editable: false, format: "{0:dd/MM/yyyy}"},
}
}
}
The problem is, is that when I try to update the date column it is sending a really long date instead of the SQL style date “YYYY-MM-DD”:
Wed Jan 09 2003 00:00:00 GMT +0000 etc
Any idea what is causing this?
The reason is because when KendoUI is about to send data to the server it serializes your data to
stringand default serialization fordatetype is the long format.You can adapt you data for sending it to the server by defining a
transport.updateas:NOTE you might need some extra validation for making sure that
DoBis actually defined