Skip to main content

move-event

Applies a drag or resize patch to an event. Fired when a drag or resize gesture commits in the grid. It behaves like update-event for date and scalar fields, decoding source-unit and recurring-occurrence context from rawId. For an array-valued resource assignment it replaces only the dragged source member and deduplicates the result. The normalized event is written back onto the payload so a data provider can read the final values.

Usage

type MoveEventPayload = {
id: EventID;
rawId?: EventID;
event: Partial<CalendarEvent>;
mode?: "single" | "following";
};

type EventID = string | number;
FieldTypeDescription
idEventIDStored event's public id — the action target.
rawIdEventIDRendered id, including chunk, unit, or recurring-occurrence suffixes. Decodes source unit and occurrence context; equals id for an unsplit ordinary event.
eventPartial<CalendarEvent>Patched fields (dates, scalars, or resource assignment). Normalized and written back onto the payload.
mode"single" | "following"Recurring edit scope. A recurring move without an explicit mode defaults to "single".

Trigger

api.exec("move-event", {
id: 42,
event: { start: new Date(2025, 4, 5, 10), end: new Date(2025, 4, 5, 11) },
});

Observe

api.on("move-event", p => console.log(p.id, p.event));

Intercept

api.intercept("move-event", p => p.id !== "locked");

Component handler

<Calendar onMoveEvent={p => console.log(p.id, p.event)} />
  • update-event — the editor-driven equivalent for scalar and date edits.
  • Timeline view — multi-resource moves that replace a single array assignment.
  • on — observe drag/resize commits without changing the store.