This is a migrated thread and some comments may be shown as answers.

Dtae Format

1 Answer 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mathew
Top achievements
Rank 1
Mathew asked on 22 Feb 2013, 07:23 AM
I have set a column in grid with the following format 
columns: [
                    { title: 'Date & Time', field: 'date', width: 130, sortable: true, template: '#= kendo.toString(date, "dd MMM yyyy") #' },

But the result i am getting is

2012-12-21T00:00:00 in Date feild 

Why is this like this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 22 Feb 2013, 09:44 AM
Hi Mathew,

I assume that the field is not defined as type: "date" in the DataSource's schema.model object.
If the field is not defined as date, the DataSource will not parse the string value into valid JavaScript Date object. As a result the formatting will not work. Please check this.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Mathew
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or