Reputation: 3274
I'm trying a simple thing as displaying a date column in a kendo ui grid in Angular using the following:
<kendo-grid-column field="date" title="Date" type="date" format="{0:d}"></kendo-grid-column>
However the result is:
'2017-04-30T09:00:00'
Upvotes: 1
Views: 2200
Reputation: 583
I guess you are using the data received from your backend. It that case your should convert your date field to Date type manually.
return this.http.get("url")
.map((res: Response) => {
let result = res.json();
result.forEach((x) => {
x.dateField= new Date(x.dateField);
});
return result;
})
Upvotes: 1
Reputation: 8825
Use the following in place of your format code: format="{0:dd/MM/yyyy}"
. You have to specify which format you wish to use
Upvotes: 0