Custom date formatting in grid column

2 posts, 0 answers
  1. Steve
    Steve avatar
    35 posts
    Member since:
    Apr 2015

    Posted 03 Sep 2015 Link to this post

    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?



         { 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'.



  2. Konstantin Dikov
    Konstantin Dikov avatar
    2115 posts

    Posted 04 Sep 2015 Link to this post

    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.

    Konstantin Dikov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top