Date is not sorting correctly in my grid. It seems that older dates than 2000 are not sorting correctly. In the database, the data type is datetime2.
Here is the code for the grid:
$("#reportsGridIn").kendoGrid({
selectable: "multiple",
sortable: {
allowUnsort: false,
initialDirection: "asc"
},
schema: {
model: {
fields: {
transDate: { type: "date" }
}
}
},
columns: [
{ field: "id", hidden: true },
{ field: "corporationName", title: "Corporation", width: 20 },
{ field: "transDate", title: "Trans Date", width: 18, template: "#= kendo.toString(new Date(parseInt(transDate.substr(6))),'MM/dd/yyyy')#", type: "date" },
{ field: "headline", title: "Headline", width: 38 },
{ field: "marketScope", title: "Market Scope", width: 25 }
]
});
Thanks,
Mike