Grid Date formating in Kendo UI for Angular

2019-09-20 18:37发布

问题:

I am trying to format a datetime field in the Kendo UI for Angular Grid and have the filter and editing features work. I can use ng-template and pipe the date into the format I want but the filter and editing of the column does not work. The data is coming from a webapi service and the date is coming in the json data as 2017-9-12T00:00:00

回答1:

Data needs to be mapped such that dates are parsed to actual JavaScript Date objects before data is bound to the Grid, so that they can be further formatted via the Grid column "format" property. For editing and filtering to work as expected, you need to specify the data type in the "filter" and "editor" properties.