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

ShowBusinessHours

3 Answers 93 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Shaun
Top achievements
Rank 1
Shaun asked on 21 Feb 2014, 03:55 PM
Hello,

I am trying to set the default view of the scheduler to show the Business Hours by default

My scheduler is built with Razor. I found a section in the documentation which says you can do showWorkHours : true, this is in the javascript version.
I also found an example somewhere that says you should be able to do something like : 

.Views(views =>
                                                {
                                                    views.DayView();
                                                    views.WeekView(weekView => weekView.Selected(true)).ShowWorkHours();
                                                    views.MonthView();
                                                    views.AgendaView();
                                                })

However this doesn't work, it tells me ShowWorkHours is not defined.
So, what am I missing ?

I am using version 2013.2.918


3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 24 Feb 2014, 07:48 AM
Hi Stuart,

The Business Hours feature is introduced with Q3 2013 release, thus it is not available in the version you have referred to. Therefore, you should upgrade to more recent version of Kendo UI.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
ian
Top achievements
Rank 1
answered on 10 May 2016, 09:10 AM

Hi,

We are getting the same problem using v2016.1.412 in our MVC project. We have set the control as below:

@(Html.Kendo().Scheduler<NG.NC.ActivityBoard.Mvc.Models.ActivityViewModel>()     

.Name("scheduler")     

.Events(events => events.Edit("scheduler_edit"))     

.Editable(x =>     {         x.Resize(false);         x.Move(false);         x.Destroy(false);     })     

.Height(740)     .Views(views =>     {         views.DayView();     })     

.Timezone("Etc/UTC")     

.ShowWorkHours(true)     

.WorkDayStart(8,30,0)     

.WorkDayEnd(19,45,0)     

.AllDaySlot(false)     

.Group(group => group.Resources("Theatres"))

...

Many thanks for any assistance

0
Rosen
Telerik team
answered on 11 May 2016, 06:28 AM

Hello ian,

In order global ShowWorkHours option to work it should be set prior to the Views configuration. Otherwise it should be set for each individual view.

Regards,
Rosen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler
Asked by
Shaun
Top achievements
Rank 1
Answers by
Rosen
Telerik team
ian
Top achievements
Rank 1
Share this question
or