Search code examples
mvvmtelerikkendo-scheduler

define current date of kendo scheduler bound with mvvm


I want to define the current date displayed by a kendo scheduler like in the JS approach:

$("#myscheduler").kendoScheduler({
   date: new Date("2016/5/5")
});

source: telerik docu

I cannot find mvvm documentation for my task. This does not work:

<div id="myscheduler" data-role="scheduler"
                      data-date="new Date('2016/5/5')"
                      data-views="['month']"
                      data-bind="source: entries, events:{dataBound: schedulerOnDataBound}"                                                                                                                     
 >

I also had no success with data-bind="value: new Date('2016/5/5')"


Solution

  • Did you try simply type the date as string? Please check the demo below (works on my side):

       <div data-role="scheduler"
                 data-views="['day']"
                 data-date="2016/1/1"