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

Formatting Date in Detail Template

1 Answer 500 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 23 Jan 2017, 09:12 AM

I have a grid that displays some data.  The date column in this schema is never null but shows as :
Created :'/Date(1482849165710)/'

I tried this and it does not change anything:
<li><label>Created :</label>'#= kendo.toString(CreatedDateTime, "dd/MM/yyyy") #'</li>

How can I format this date?  And is there something else needed?

 

Thanks,

Reid

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 24 Jan 2017, 02:44 PM
Hello Reid,

I think the format might me ignored if the Created field is not defined in the schema model as a field of type "date". Could you check the data source of the Kendo UI Grid (and detail) and ensure that the schema definition is complete? For a comprehensive list of schema model definitions, check the model API at:

http://docs.telerik.com/kendo-ui/api/javascript/data/model#methods-Model.define

For your convenience, I have created a sample demo with the scenario as I imagine it:

http://dojo.telerik.com/ujUha

Please feel free to modify it and get back to me with the newly generated URL from the address bar if I have misunderstood the situation.

Kind Regards,
Alex Hajigeorgieva
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or