EventSelection
Mixin
Mixin that tracks event selection by clicking on one or more events in the calendar. It manages a collection of selected events and keeps the UI in sync, applying or removing the selected CSS class on event elements as the selection changes. The mixin fires a selectionChange event whenever events are selected or deselected, allowing application code to respond to user selection gestures.
const calendar = new Calendar({
listeners : {
selectionChange({ selection }) {
console.log('Selected events:', selection.map(e => e.name));
}
}
});
// Programmatic selection
calendar.selectedEvents = [calendar.eventStore.first];
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Configure as
falseto preserve selection when clicking the empty schedule area.Has a corresponding runtime deselectAllOnScheduleClick property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of EventSelection class, or subclass thereof.
-
Identifies an object as an instance of EventSelection class, or subclass thereof.
-
Configure as
falseto preserve selection when clicking the empty schedule area.Has a corresponding deselectAllOnScheduleClick config.
-
The events which are selected.
Functions
Functions are methods available for calling on the class-
onEventSelectionClick( )private
Mouse listener to update selection.
-
onSelectedCollectionChange( )private
Responds to mutations of the underlying selection Collection. Keeps the UI synced, selectionChange event is fired when
me.silentis falsy. -
Deselects all events.