CalendarStores
Mixin
Mixin that provides store management and data binding for the Calendar. It connects the Calendar to its underlying data stores (event store, resource store, time range store) through a project, and manages the CrudManager for server communication. This mixin also handles default calendar assignment for new events, time zone configuration, and propagation of store references to child widgets such as the sidebar date picker and resource filter.
Classes that use this mixin gain access to data stores. For example, through a Calendar:
const calendar = new Calendar({
// Inline event data
events : [
{ id : 1, name : 'Meeting', startDate : '2024-01-15 09:00', endDate : '2024-01-15 10:00' }
],
// Inline resource data
resources : [
{ id : 1, name : 'Default Calendar', eventColor : 'blue' }
],
// Assign events to the default resource
defaultCalendar : 1
});
// Access stores programmatically
calendar.eventStore.add({ name : 'New event', startDate : '2024-01-16 14:00', endDate : '2024-01-16 15:00' });
See also
- ProjectModel — The project that bundles all stores
- CrudManager — CrudManager for server communication
- Calendar — The Calendar class that uses this mixin
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The AssignmentStore or a reconfiguring object for a store which will hold assignments linking resources to events.
Has a corresponding runtime assignmentStore property.
-
Inline assignments, will be loaded into the assignmentStore.
Has a corresponding runtime assignments property.
-
Supply a CrudManager instance or a config object if you want to use CrudManager for handling data.
Has a corresponding runtime crudManager property.
-
Class that should be used to instantiate a CrudManager in case it's provided as a simple object to crudManager config.
-
The EventStore or a reconfiguring object for a store which will hold the events to be rendered into the Calendar.
Has a corresponding runtime eventStore property.
-
Inline events, will be loaded into the eventStore.
Has a corresponding runtime events property.
-
The ResourceStore or a reconfiguring object for a store which will hold the resources to be rendered into the Calendar.
Has a corresponding runtime resourceStore property.
-
The ResourceTimeRangeStore or a reconfiguring object for a store which will hold resource time ranges. These may be used by the TimeRanges feature.
Has a corresponding runtime resourceTimeRangeStore property.
-
Inline resources, will be loaded into the resourceStore.
Has a corresponding runtime resources property.
-
The TimeRangeStore or a reconfiguring object for a store which will hold time ranges. These may be used by the TimeRanges feature.
Has a corresponding runtime timeRangeStore property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of CalendarStores class, or subclass thereof.
-
Identifies an object as an instance of CalendarStores class, or subclass thereof.
-
The AssignmentStore holding assignments linking resources to events.
Has a corresponding assignmentStore config.
-
Inline assignments, will be loaded into the assignmentStore.
Has a corresponding assignments config.
-
Get/set the CrudManager instance
Has a corresponding crudManager config.
-
The EventStore holding the events to be rendered into the Calendar.
Has a corresponding eventStore config.
-
Inline events, will be loaded into the eventStore.
Has a corresponding events config.
-
The ResourceStore holding the resources to be rendered into the Calendar.
Has a corresponding resourceStore config.
-
The ResourceTimeRangeStore holding resource time ranges. These may be used by the TimeRanges feature.
Has a corresponding resourceTimeRangeStore config.
-
Inline resources, will be loaded into the resourceStore.
Has a corresponding resources config.
-
The TimeRangeStore holding time ranges. These may be used by the TimeRanges feature.
Has a corresponding timeRangeStore config.