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

Custom date formatting in grid column

1 Answer 566 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 03 Sep 2015, 04:26 PM

Hi All,

 

I have a function that grab the specific date format from a config file,  but the code below output the wrong date format.  Could anyone tell me what what I'm missing or did wrong?

 

columns:[

     { title: "Date", field: "tDate", width: 190, template: '#= kendo.toString(tDate,  getMyFormattedDate()) #' }

];

 result is always Tue Jul 28 2015 13:01:36 GMT-0600 (Mountain Daylight Time) and the format from getMyFormattedDate is set as 'MM-dd-yyyy'.

 

TIA

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 04 Sep 2015, 02:11 PM
Hello Steve,

I am not sure why the format is failing to be applied in your scenario, but you can refer to the following dojo example which works correctly:
Please note that you will also have to set the type of the column to "date".

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Date/Time Pickers
Asked by
Steve
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or