Does anyone know how to properly format a DateTime in the grid? (Is this datatype even supported?).
No matter what I put in the \"filter\" property of the column, my
In order for the grid to format the date properly you need to convert it into a JS date. I usually do that in the callback from the ajax call retrieving the data from the server. Something like that:
api.get('some server url').then(function(data) {
if (data.SomeDate) data.SomeDate = new Date(data.SomeDate);
});
(This is a pseudo code, don't use it directly)
This will allow you to format the date as:
field="SomeField" format='{0:d}
or
field="SomeField" format='{0:MM/dd/yyyy h:mm a}
Hope that helps.