How to change DateHeaderTemplate in mvc

3 posts, 1 answers
  1. Jonas
    Jonas avatar
    36 posts
    Member since:
    Oct 2014

    Posted 06 Oct 2014 Link to this post

    Hello

    I want to change the DateHeaderTemplate from the standard "ddd MM/dd" format to "ddd dd/MM". How do I do this in MVC?
    I couldn't find an example for MVC in the docs, only for javascript.

    BR
    Jonas
  2. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 08 Oct 2014 Link to this post

    Hi Jonas,

    You can change the content of the Day/Week/WorkWeek Views header cells via the DateHeaderTemplate setting, similar to the following:

    @(Html.Kendo().Scheduler<ViewModel>()
        .Name("scheduler")
        .DateHeaderTemplate("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd/MM')#</span>")
        /*..*/
        .DataSource(/*..*/)
    )


    Regards,
    Rosen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jonas
    Jonas avatar
    36 posts
    Member since:
    Oct 2014

    Posted 08 Oct 2014 in reply to Rosen Link to this post

    Hi Rosen

    Thank you, that worked perfectly!

    BR
    Jonas
Back to Top