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

How to change DateHeaderTemplate in mvc

2 Answers 120 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonas
Top achievements
Rank 1
Jonas asked on 06 Oct 2014, 11:56 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 08 Oct 2014, 08:33 AM
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.

 
0
Jonas
Top achievements
Rank 1
answered on 08 Oct 2014, 08:42 AM
Hi Rosen

Thank you, that worked perfectly!

BR
Jonas
Tags
Scheduler
Asked by
Jonas
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jonas
Top achievements
Rank 1
Share this question
or