Customize Date Formatting (Relative Time) for Grid Column

2 posts, 0 answers
  1. Marlon
    Marlon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 30 Jun 2015 Link to this post

    I'd like to switch a column of a grid to display a more human readable relative time string (similar to moment.js's fromNow() method) but I'd also like the column to still be sortable based the actual date object. How can I accomplish this?
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1966 posts

    Posted 02 Jul 2015 Link to this post

    Hello Marlon,


    Customizing the format of the value displayed in the column could be achieve by using columns.format. This is only visual modification on how the values will be displayed in the columns, so the actual data remains the same. Given this sorting functionality should work against the actual date object.  



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