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

Block-out slots for All Day Event

1 Answer 58 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Feb 2014, 08:07 PM
Is there a way to block out the slots for an all day event, instead of having the event in the "all day" slot?

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 11 Feb 2014, 09:56 AM
Hello Camilo,

I'm not sure if I understood you question correctly. Do you want to prevent user from adding new events by double clicking on a all day slot? If this is the case you may use the Scheduler add event to check if the event is all day and to prevent it:

$("#scheduler").kendoScheduler({
    add: function (e) {
      if (e.event.isAllDay) {
          alert("Creating all day events is not allowed!");
          e.preventDefault();
      }
    },
    /*..*/
});

You can use the same approach to prevent resizing (handle the resizeStart event), event move and editing.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Scheduler
Asked by
David
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or