kendo scheduler MVVM dateHeaderTemplate Not work

1 Answer 19 Views
MVVM Scheduler
vahid
Top achievements
Rank 2
Iron
Iron
Iron
vahid asked on 11 Jul 2022, 04:10 PM

hi

i need use MVVM  (dateHeaderTemplate) but can not show anything sample

thank you

1 Answer, 1 is accepted

Sort by
1
Accepted
Lyuboslav
Telerik team
answered on 14 Jul 2022, 11:13 AM

Hello Vahid,

To achieve the needed result you can see the dojo linked here.

In the dojo, I removed the property you used: date-header-template, and add it to "data-views":

<div data-role="scheduler"
                 data-views="[{
                   name: 'day',
                             dateHeaderTemplate: 'Test this <h1>#=kendo.toString(date, \'d\')#</h1>'
                 }]"
                 data-bind="source: tasks"
                 style="height: 400px"></div>

To customize dateHeaderTemplate you could change the content of it as in the example below:

 dateHeaderTemplate: 'Test this <h1>#=kendo.toString(date, \'d\')#</h1>'

I hope this will help in your scenario.

Regards,
Lyuboslav
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
MVVM Scheduler
Asked by
vahid
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Lyuboslav
Telerik team
Share this question
or