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

[Solved] MVC Custom Editor Popup Static Date Formatting

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 30 Sep 2014, 06:16 PM
Hi. I'm trying to add a Date as text to a custom editor popup in .NET MVC. It appears I cannot simply just do @Model.LastUpdatedDate to display the date. I do not want this in a DatePicker/Textbox. Searching the forums, I've encountered using ${LastUpdatedDate} and that displays the content; however I need to format the date as "7/9/2014 14:00" rather than what is displayed like "Wed Sep 10 14:22:55 EDT 2014." Any help would be greatly appreciated. Thanks so much.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 02 Oct 2014, 12:24 PM
Hello Craig,

I would suggest using the toString method in the template expression. For example: 
${kendo.toString(LastUpdatedDate, 'g')}

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