Hide hour between 12pm and 13pm

3 posts, 0 answers
  1. Julien
    Julien avatar
    10 posts
    Member since:
    Apr 2017

    Posted 13 Apr 2017 Link to this post

    Hello,

    I have a startTime and a endTim on my Scheduler: from 7 AM to 16PM and I wonder if It's possible to hide one hour from 12 pm to 13pm.

    @(Html.Kendo().Scheduler<KendoSchedulerMVC.Controllers.TAS_TasksViewModel>()
        .Name("scheduler")
        .Timezone("Etc/UTC")
        .Date(new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day))
        .Height(800)
        .StartTime(new DateTime(2013, 6, 13, 7, 00, 00))
        .EndTime(new DateTime(2013, 6, 13, 16, 00, 00))

        .Editable(editable => editable
            .EditRecurringMode(SchedulerEditRecurringMode.Dialog)
        )
        .Selectable(false)
        .Views(views => {
            views.DayView();
            views.WorkWeekView();
            views.WeekView(w => w.Selected(true));
            views.MonthView();
            views.AgendaView();
        })
        .DataSource(d => d
            .Model(m => {
                m.Id(f => f.tas_id);
                m.Field(f => f.Title).DefaultValue("No title");
                m.RecurrenceId(f => f.RecurrenceID);
            })
            .Read(read => read.Action("TAS_Tasks_Read", "Scheduler"))
            .Create(create => create.Action("TAS_Tasks_Create", "Scheduler"))
            .Update(update => update.Action("TAS_Tasks_Update", "Scheduler"))
            .Destroy(destroy => destroy.Action("TAS_Tasks_Destroy", "Scheduler"))
        )
    )

     

    Thank you

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1726 posts

    Posted 14 Apr 2017 Link to this post

    Hello Julien,

    This is not supported through configuration or the Scheduler's API but can be achieved with jQuery. You can hide the the rows for a particular time interval by hiding the corresponding rows. Here's a sample dojo. 2 rows are hidden from the time table (12:00-12:30 and 12:30-13:00) and two corresponding rows from the content table (where the events are shown). Note that apart from hiding them on document-ready they must be hidden in the navigate event because when you switch views (day -> week for instance) the Scheduler is re-rendered, thus the rows will be shown if you do not hide them in the navigate event handler.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Julien
    Julien avatar
    10 posts
    Member since:
    Apr 2017

    Posted 14 Apr 2017 in reply to Ivan Danchev Link to this post

    Thank you Danchev's it's works perfectly.  
Back to Top