Skip to content

Interactions

The calendar is controlled: moving, resizing or creating an event does not change items. It calls a callback and waits for new items; if you don’t apply the change, the event snaps back. This is the place for validation, server calls and undo.

Gesture Result
Drag on an empty part of a day onEventCreate(start, end)
Drag an event onEventChange(item, start, end): new day and/or time; the timeline scrolls near its edges
Drag the top or bottom edge (day, week) onEventChange: new start or end, into other days too
Drag the left or right edge (month) onEventChange: the event covers more or fewer days
Double-click an empty month day onEventCreate: one hour, starting now
Double-click an event, or Enter on it onEventEdit(item) (DOM package)
Delete / Backspace on a focused event onEventDelete(item) (DOM package)
Esc during a drag cancels it

Edits snap to timeStep minutes (15 by default).

  • timeFrame: { hourMin, hourMax } limits the visible hours and keeps edits inside them; hideMinMaxTime hides the hours outside.
  • getIsDayDisabled(date) blocks creating and dropping on a day.
  • disabled turns every interaction off.
Result· 08:00–18:00 only; weekends are blocked
<Calendar
timeFrame={{ hourMin: 8, hourMax: 18 }}
hideMinMaxTime
getIsDayDisabled={(date) => date.getDay() === 0 || date.getDay() === 6}
{...rest}
/>