Optional payload type attached to each event.
Creates an in-memory calendar datasource.
Optional payload type attached to each event.
Seed events (defensively copied).
ReadonlychangedEmitted whenever the underlying event data changes (add, remove, update, bulk replace).
Returns the total number of events currently held.
Appends multiple events at once.
Events to add.
Returns all events (snapshot copy).
Returns all events whose date range intersects [rangeStart, rangeEnd].
An event intersects the range when:
event.start <= rangeEnd and(event.end ?? event.start) >= rangeStartInclusive start of the query window.
Inclusive end of the query window.
Removes an event by its id.
The event ID to remove.
true if an event was removed, false if not found.
Replaces the entire event set.
New events (defensively copied).
Replaces an event with a matching id. If no match is found the
new event is appended instead.
The updated event.
In-memory CalendarDatasource backed by a plain array of events.
Supports add, remove, update, and bulk-replace operations, each of which triggers the
changedemitter so the connected view refreshes.Example