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

Hide hour between 12pm and 13pm

2 Answers 17 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 13 Apr 2017, 03:31 PM

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 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 14 Apr 2017, 10:06 AM
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.
0
Julien
Top achievements
Rank 1
answered on 14 Apr 2017, 02:50 PM
Thank you Danchev's it's works perfectly.  
Tags
Scheduler
Asked by
Julien
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Julien
Top achievements
Rank 1
Share this question
or