delete-event
Removes an event from the calendar store. The matching ondeleteevent callback fires after the event is removed.
Usage
type DeleteEventPayload = {
id: EventID;
};
| Field | Type | Description |
|---|---|---|
id | EventID | Event to remove |
EventID is string | number.
Trigger
api.exec("delete-event", { id: 5 });
Observe
api.on("delete-event", p => console.log("deleted", p.id));
Intercept
api.intercept("delete-event", p => {
if (!confirm("Delete event?")) return false;
});
Component handler
<Calendar ondeleteevent={p => console.log("deleted", p.id)} />
Related articles
add-event— counterpart for creating events.update-event— change without removing.intercept— confirm before deletion runs.- Editing — context-menu and editor delete flow.
- Recurring events — caveats for masters and exceptions.