In datasource I specify the group field - works fine with text, sorting in ASC order.
I would like to group by date in DESC order, that is, most recent date first.
When I group on a date field I get the error:
Uncaught TypeError: d.myDate.getTime is not a function
I can convert the date to text, but then it does not sort correctly when using mm/dd/yyyy.
Even in yyyy/mm/dd format it is sorted ASC, not DESC as I require.
Is there a solution for this?
data: new kendo.data.DataSource({
transport: {
read: {
url: function () {
return app.uri + "clients";
},
type: "get",
dataType: "json"
}
},
schema: {
data: function (response) {
var obj = $.parseJSON(response);
return obj;
}
},
group: { field: "Date" } //causes error
})