Formatting specific dates

2 posts, 0 answers
  1. Joachim
    Joachim avatar
    7 posts
    Member since:
    Oct 2014

    Posted 09 Feb Link to this post


     I'm looking for a way to put a list of dates in bold and /or alter their background color. I'll receive a list in the model sent to this view, in the example below I just simulate the model I'll be expecting.


    @{ var datesTest = new DateTime[]{new DateTime(2016, 2, 1),

                                                               new DateTime(2016, 2, 2),

                                                               new DateTime(2016, 2, 3),

                                                               new DateTime(2016, 2, 4),

                                                               new DateTime(2016, 2, 5)};



    Can this easily be done?

  2. Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 10 Feb Link to this post

    Hello Joachim,

    I would suggest you check our Templates online demo: It shows how to use a custom cell template in order to modify the rendered value.

    In your case, you will need to serialize the list dates, producing a list of JavaScript Date objects similar to the birthdays collection.

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