I would like to sort my datasource by date. However, whenever I change the field type from "string" to "date" I get "null" in place of the dates. The format of the dates is: dd-mm-yy hh:mm
Can anyone see what I am doing wrong?
Many thanks,
Can anyone see what I am doing wrong?
var ticketDataSource = new kendo.data.DataSource({
transport: {
read: "/support/data",
dataType: "json",
create: {
url: function() {
if (support_create_type == 'new'){
var url = "/support/newticketpost/";
} else if (support_create_type == 'reply'){
var url = "/support/reply/" + support_id + "/";
}
return url;
},
type: "POST",
dataType: "json"
},
update: {
url: function() {
if (support_update_type == 'markasread'){
var url = "/support/markasread/" + support_id + "/";
} else if (support_update_type == 'close'){
var url = "/support/close/" + support_id + "/" + support_ticket_closed;
}
return url;
},
type: "POST",
dataType: "json"
},
},
error: function(e) {
alert(e.responseText);
},
sort: { field: "DateCreated", dir: "asc" },
schema: {
model: {
id: "ThreadID",
fields: {
DateCreated: { type: "date" },
Subject: { type: "string" },
Closed: { type: "string" }
}
}
}
});
Many thanks,