# Editing

The Scheduler enables you to create, update, and delete its events.

## Getting Started

Use the [`data`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#data) property and [`onDataChange`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#onDataChange) callback to manage the Scheduler events through [data binding](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/data-binding).

To enable all edit modes, set [`editable`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#editable) to `true`. To enable individual operations, provide an [`EditableProp`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/editableprop) object with any of the following options:

* `add`—Allows creating events through the [quick-create popover](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/editing#creating-events) or the full editor.
* `remove`—Allows deleting events.
* `drag`—Allows changing an event's start, end, or [resources](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/resources) by dragging it.
* `resize`—Allows changing the event duration by resizing it.
* `edit`—Allows updating events through the full editor.
* `select`—Allows selecting events and slots.

```jsx
    <Scheduler
        editable={{
            add: false,
            remove: false,
            drag: true,
            resize: true,
            edit: true
        }}
    />
```

The example below supports creating, editing, deleting, dragging, and resizing events.

[Demo Source](https://demos.telerik.com/kendo-react-ui/scheduler/data-operations/editing/setup/func/source.txt)

## Creating Events

When adding events is enabled, click an empty slot or press **Enter** on a focused slot to open the quick-create popover. The selected slot supplies the start and end times. Enter a title and choose one of the following actions:

* **Save** creates the event.
* **More options** opens the full editor with the title and time range preserved.
* **Cancel** closes the popover without creating an event.

Double-click an empty slot to open the full editor directly. To disable the popover, set [`quickCreate`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#quickCreate) to `false`. You can also [customize the quick-create form](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/customization/form/overview#customizing-the-quick-create-form) and its validation.

In the example below, click an empty time slot to open quick create, or double-click it to open the full editor. Clicking an existing event opens its preview instead. Toggle **Quick create** in **Component Properties** configurator.

[Demo Source](https://demos.telerik.com/kendo-react-ui/scheduler/data-operations/editing/create/source.txt)

## Previewing Events

Click or tap an event, or press **Enter** on a focused event, to open its details popover. The popover displays the title, date and time range, and description when one is available. Event times use the Scheduler's configured [timezone](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/timezones).

The [`eventOverview`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#eventOverview) property is `true` by default. Set it to `false` to disable the popover. Double-clicking an event still opens the full editor when editing is enabled.

The `editable` configuration determines which actions appear:

* **Edit** opens the full editor when `editable.edit` is enabled.
* **Delete** starts the removal flow when `editable.remove` is enabled.
* For recurring events, the action menus let you choose the current occurrence or the entire series.

When editing is disabled, you can still preview event details, but no action buttons appear. Press **Escape** or click outside the popover to close it.

The following example demonstrates previewing and editing a single meeting and a recurring team check-in.

[Demo Source](https://demos.telerik.com/kendo-react-ui/scheduler/data-operations/editing/preview/source.txt)

## Saving Changes

The [`onDataChange`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerprops#onDataChange) event provides `created`, `updated`, and `deleted` arrays. Apply these changes to your data and assign a unique ID to each newly created event.

The [Getting Started example](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/editing#getting-started) stores changes locally and assigns new IDs with `guid` from `@progress/kendo-react-common`.

## Choosing Dates and Times

The built-in editor preserves the event duration when you change its start date or time by moving the end by the same amount. You can then change the end separately to adjust the duration. The end picker uses the current start as its minimum, and the form validates the date range before saving.

Enable **All day** to use date-only editors. Timed events use separate date and time inputs and offer a **Time zone** action for event-specific timezone settings. Resetting those settings asks for confirmation before removing the start and end timezones.

Use the [main editing example](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/editing#getting-started) to change a meeting's start time and compare the updated end time.

## Discarding Unsaved Changes

The built-in event editor asks for confirmation when you change a field and then click **Cancel** or close the editor. Choose **Discard changes** to close the editor without saving, or **Cancel** to return to the form and keep editing. If you have not changed the form, the editor closes without a confirmation dialog.

This behavior is built into the default [`SchedulerForm`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerform) and does not require additional configuration. If you replace the form through the Scheduler's `form` property, your custom component is responsible for handling unsaved changes.

## Suggested Links

* [Form Customization](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/customization/form/overview)
* [Recurring Events](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/recurring)
* [Data Binding](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/data-binding)
* [SchedulerDataChangeEvent API](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerdatachangeevent)
