ShowBusinessHours

4 posts, 0 answers
  1. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 21 Feb 2014 Link to this post

    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


  2. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 24 Feb 2014 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. ian
    ian avatar
    4 posts
    Member since:
    May 2011

    Posted 10 May in reply to Rosen Link to this post

    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

  5. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 11 May Link to this post

    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
Back to Top
UI for ASP.NET MVC is VS 2017 Ready