Editing Restrictions
The Scheduler provides multiple approaches to prevent or restrict its editing functionality, including event-based restrictions, conditional editing, and CSS-based visual restrictions.
Event-Based and CSS-Based Restrictions
You can combine event handling and CSS styling to create comprehensive editing restrictions.
The following example demonstrates how to prevent users from creating, editing, moving, or resizing events in slots that are already occupied using both approaches.
Preventable Events
The Scheduler provides the following events that you can handle to prevent editing operations by setting the preventDefault property to true:
| Event | Description | Use Case |
|---|---|---|
add | Fires before the editing directive renders the Add dialog. | Prevent creation in specific time slots or based on business rules. |
edit | Fires before the editing directive renders the Edit dialog. | Restrict editing of certain events or during specific conditions. |
remove | Fires when an event is removed. | Prevent deletion of important events or based on user permissions. |
dragStart | Fires when an event drag operation starts. | Prevent dragging of certain events or during restricted periods. |
dragEnd | Fires when an event drag operation ends. | Prevent moving events to restricted areas or time periods. |
resizeStart | Fires when an event resize operation starts. | Block resizing in occupied slots or for specific event types. |
resizeEnd | Fires when an event resize operation ends. | Block resizing in occupied slots or for specific event types. |
The add event fires only for the full edit dialog. To restrict the quick create functionality, you can turn it off in the affected views or add FormGroup validators. The popover cannot save an invalid form.
CSS-Based Visual Restrictions
The example also shows how to use CSS styling to provide visual feedback for restricted areas:
slotClassproperty—Apply custom CSS classes to specific time slots to indicate restrictions.- Custom CSS—Use
pointer-events: noneand visual styling to prevent interactions and show restricted areas. - Event styling—Apply CSS to make certain events appear read-only or restricted.
Read-Only Events
When the readonly field of an event is true, users cannot edit the event in any way, including by dragging. The event overview popover still shows its details but hides the Edit and Delete actions.
public events: SchedulerEvent[] = [{
id: 1,
title: 'Board meeting',
start: new Date(2026, 10, 9, 10),
end: new Date(2026, 10, 9, 11),
readonly: true
}];
Conditional Editing
You can render a read-only Scheduler (for example, depending on user permissions) by setting the editable attribute to false.
<kendo-scheduler [editable]="false">
</kendo-scheduler>