This is a migrated thread and some comments may be shown as answers.
Scheduler MVVM
6 Answers 44 Views
This is a migrated thread and some comments may be shown as answers.
Andres
Top achievements
Rank 1
Andres asked on 16 Dec 2013, 08:26 PM
Hi, it is possible to set the showWorkHours option using MVVM? If is it possible which is the data-??? parameter?

Thanks in advance

6 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 17 Dec 2013, 10:24 AM
Hi Andres,

Yes it is possible. The convention used to transform JavaScript configuration options into data attributes is explained in this help article:

I hope the information will help.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andres
Top achievements
Rank 1
answered on 17 Dec 2013, 11:43 PM
I tried with data-show-work-hours but it didn't work ... :-( do you have some advice? 
0
Alexander Valchev
Telerik team
answered on 18 Dec 2013, 01:56 PM
Hi Andres,

I believe that the problem comes from the fact that the showWorkHours option does not have a default value. The developer can set configuration options via data attributes only if they have a default value in the widget's prototype.

Please try to add the following line:
kendo.ui.Scheduler.fn.options.showWorkHours = false;

The code should be executed before kendo.bind is called. It is best to put it right after Kendo JavaScript file.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Darryl
Top achievements
Rank 1
answered on 19 May 2014, 12:22 PM
This doesn't work for me. I'm using v2014.1.318

Is there a better way now?
0
Alexander Valchev
Telerik team
answered on 21 May 2014, 08:56 AM
Hi Darryl,

I prepared a small example. Could you please check it and let me know what I am missing?
Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Darryl
Top achievements
Rank 1
answered on 22 May 2014, 05:04 AM
Hi Alexander,

Not sure what was going on but appears to be working ok now.

Thanks.

Asked by
Andres
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Andres
Top achievements
Rank 1
Darryl
Top achievements
Rank 1
Share this question
or