SchedulerBase
A thin base class for Scheduler. Does not include any features by default, allowing smaller custom-built bundles if used in place of Scheduler.
NOTE: In most scenarios you do probably want to use Scheduler instead of SchedulerBase.
Configs
263
Configs
263Common
See Keyboard shortcuts for details
Scheduler mode. Supported values: horizontal, vertical
The height in pixels of Scheduler rows.
Calendar integration
The date to display when used as a component of a Calendar.
This is required by the Calendar Mode Interface.
Range used to set the length of the time axis when used as a component of a Calendar. Suitable units are
'month', 'week' and 'day'.
This may also be specified as a duration with a magnitude part and a unit part. For
example '1m' would mean one month, and '4w' would mean four weeks.
See parseDuration for details
of syntax.
When using a range of weeks or months, then when this widget's date is synced with its owning Calendar's date property, this widget's startDate is snapped to the closest start point of the range which encompasses that date.
So if using range : '1w', then setting the date to Thursday, 28th October 2021
Would mean that the startDate snaps to Sunday 24th October 2021 (assuming the locale
uses Sunday as the week start day).
mode.
it will have no effect on a Scheduler which is not inside a Calendar.If not specified, this view moves by its duration in days as derived from its range.
Valid values are:
- day
- week
- month
- year
- decade
This may also be specified as a duration with a magnitude part and a unit part. For
example '1m' would mean one month, and '4w' would mean four weeks.
See parseDuration for details
of syntax.
When using a range of weeks, months, years or decades, then when this widget's date is synced with its owning Calendar's date, this widget's startDate is snapped to the closest start point of the range which encompasses that date.
So if using range : '1w', then setting the date to Thursday, 28th October 2021
Would mean that the startDate snaps to Sunday 24th October 2021 (assuming the locale
uses Sunday as the week start day).
If configured to use a range of days, no snapping is done. There's no defined start point so the startDate is set to the incoming Calendar date.
Data
Inline assignments, will be loaded into an internally created AssignmentStore.
The optional AssignmentStore, holding assignments between resources and events. Required for multi assignments.
Inline dependencies, will be loaded into an internally created DependencyStore.
The optional DependencyStore.
Inline events, will be loaded into an internally created EventStore.
The EventStore holding the events to be rendered into the scheduler (required).
Inline resources, will be loaded into an internally created ResourceStore.
The ResourceStore holding the resources to be rendered into the scheduler (required).
Layout
Scheduler overrides Grid's default implementation of getRowHeight to pre-calculate row heights based on events in the rows.
The amount of rows that are pre-calculated is limited for performance reasons. The limit is configurable by specifying the preCalculateHeightLimit config.
The results of the calculation are cached internally.
renderer. See the snippet below for an example.new Scheduler({
columns : [
{
text : 'Name',
field : 'name',
width : 130,
renderer({ value, record, size }) {
// Set your desired height here
size.height = record.parentIndex % 2 === 0 ? 100 : 40;
return value;
}
}
]
});
| Parameter | Type | Description |
|---|---|---|
getRowHeight.record | ResourceModel | Resource record to determine row height for |
Desired row height
Maximum number of resources for which height is pre-calculated. If you have many events per resource you might want to lower this number to gain some initial rendering performance.
Specify a falsy value to opt out of row height pre-calculation.
Masking
By default, when the EventStore (and similar stores) is lazy loading, a loading indicator will be displayed
just below the timeline headers. Set this to false to prevent this indicator being shown.
Misc
Configure as true to make the scheduler read-only, by disabling any UIs for modifying data.
Note that checks MUST always also be applied at the server side.
"Break points" for which responsive config to use.
Each level can be specified as:
- A number representing the width threshold (e.g.,
400) - The string
'*'to match all sizes above other thresholds - A SchedulerResponsiveLevelConfig object with
levelWidthand scheduler properties
See the responsive guide for details and examples.
If set to true this will show a color field in the EventEdit editor and also a
picker in the EventMenu. Both enables the user to choose a color which will be
applied to the event bar's background. See EventModel's
eventColor config.
config.
By default, scrolling the schedule will update the timelineContext to reflect the new
currently hovered context. When displaying a large number of events on screen at the same time, this will
have a slight impact on scrolling performance. In such scenarios, opt out of this behavior by setting
this config to false.
Other
Set to true for child nodes in a tree store to inherit their parent´s eventColor
mode.A Menu configuration block which configures the range choosing menu provided which by default selects one of the following:
- day
- week
- month
- year
- decade
This menu is added to the TimeAxisHeaderMenu when the Scheduler is used as a Calendar view.
This may be used to either reconfigure that menu, or, by configuring it as null, could remove
the menu entirely if the date range of this view is controlled by other means.
The individual range menu items are under the items property and have the following
property names:
listRangeDayItemlistRangeWeekItemlistRangeMonthItemlistRangeYearItemlistRangeDecadeItem
These may be reconfigured:
calendar = new Calendar({
...
modes : {
timeline : {
type : 'scheduler',
range : 'month',
listRangeMenu : {
items : {
// We don't want the decade range option
listRangeDecadeItem : null
}
}
}
}
});
Configure UI transitions for various actions in the grid.
| Parameter | Type | Description |
|---|---|---|
insertRecord | Boolean | Transition record insertions |
removeRecord | Boolean | Transition record removals |
toggleColumn | Boolean | Transition column visibility changes |
expandCollapseColumn | Boolean | Transition parent/group column expand/collapse |
toggleRegion | Boolean | Transition region expand/collapse |
toggleTreeNode | Boolean | Transition tree node expand/collapse |
toggleGroup | Boolean | Transition group expand/collapse |
filterRemoval | Boolean | Transition row removals caused by filtering (under specific conditions) |
removeEvent | Boolean | Transition event removals |
changeEvent | Boolean | Transition event changes |
Scheduled events
Set to false if you don't want to allow events overlapping times for any one resource (defaults to true).
If this config is set, then its gesture property (which defaults to dblclick) creates a
new event at the mouse or touch event's time point.
When set to true, the gesture is dblclick, and the new event will have a duration of 1 time axis tick.
This may be specified as the string DOM event name to listen for, such as 'click', 'dblclick'
and the new event will have a duration of 1 time axis tick.
The duration of the new event can be set by specifying the duration property as a DurationConfig.
If that is not set, then setting the useEventModelDefaults property will cause the duration
to be specified by the default values of the duration and
durationUnit fields
Example:
new Scheduler({
autoCreate : {
gesture : 'click',
duration : '2 hours',
newName : 'New appointment'
}
});
| Parameter | Type | Description |
|---|---|---|
autoCreate.gesture | click | dblclick | The gesture to trigger auto creation of an event. Defaults to |
autoCreate.useEventModelDefaults | Boolean | Set to |
autoCreate.snapType | round | ceil | floor | The type of snapping to apply to the event start date. If omitted, the date will be floored to the time axis resolution. |
autoCreate.step | DurationConfig | String | The increment to snap the event start date to. |
autoCreate.duration | DurationConfig | String | The duration of the event to create. Defaults to 1 time axis tick. |
autoCreate.name | String | The name of the event to create. Defaults to the |
A method allowing you to define date boundaries that will constrain resize, create and drag drop operations. The method will be called with the Resource record, and the Event record.
new Scheduler({
getDateConstraints(resourceRecord, eventRecord) {
// Assuming you have added these extra fields to your own EventModel subclass
const { minStartDate, maxEndDate } = eventRecord;
return {
start : minStartDate,
end : maxEndDate
};
}
});
| Parameter | Type | Description |
|---|---|---|
resourceRecord | ResourceModel | The resource record |
eventRecord | EventModel | The event record |
Constraining Object containing start and end constraints. Omitting either
will mean that end is not constrained. So you can prevent a resize or move from moving before
a certain time while not constraining the end date.
Time axis
The time axis column config for vertical mode.
Object with VerticalTimeAxisColumn configuration.
This object will be used to configure the vertical time axis column instance.
The config allows configuring the VerticalTimeAxisColumn instance used in vertical mode with any Column options that apply to it.
Example:
new Scheduler({
mode : 'vertical',
features : {
filterBar : true
},
verticalTimeAxisColumn : {
text : 'Filter by event name',
width : 180,
filterable : {
// add a filter field to the vertical column access header
filterField : {
type : 'text',
placeholder : 'Type to search',
onChange : ({ value }) => {
// filter event by name converting to lowerCase to be equal comparison
scheduler.eventStore.filter({
filters : event => event.name.toLowerCase().includes(value.toLowerCase()),
replace : true
});
}
}
}
},
...
});
Content
CSS
Dates
DOM
Float & align
Milestones
misc
Selection
State
Tree
Zoom
Properties
250
Properties
250Common
Get mode (horizontal/vertical)
Calendar integration
The date to display when used as a component of a Calendar.
This is required by the Calendar Mode Interface.
mode.
it will have no effect on a Scheduler which is not inside a Calendar.If not specified, this view moves by its duration in days as derived from its range.
Valid values are:
- day
- week
- month
- year
- decade
This may also be specified as a duration with a magnitude part and a unit part. For
example '1m' would mean one month, and '4w' would mean four weeks.
See parseDuration for details
of syntax.
When using a range of weeks, months, years or decades, then when this widget's date is synced with its owning Calendar's date, this widget's startDate is snapped to the closest start point of the range which encompasses that date.
So if using range : '1w', then setting the date to Thursday, 28th October 2021
Would mean that the startDate snaps to Sunday 24th October 2021 (assuming the locale
uses Sunday as the week start day).
If configured to use a range of days, no snapping is done. There's no defined start point so the startDate is set to the incoming Calendar date.
Class hierarchy
Data
Get/set assignments, applies to the backing project's AssignmentStore.
Get/set the event store instance of the backing project.
Get/set dependencies, applies to the backing projects DependencyStore.
Get/set the dependencies store instance of the backing project.
Get/set events, applies to the backing project's EventStore.
Get/set the event store instance of the backing project.
Get/set resources, applies to the backing project's ResourceStore.
Get/set the resource store instance of the backing project
Masking
By default, when the EventStore (and similar stores) is lazy loading, a loading indicator will be displayed
just below the timeline headers. Set this to false to prevent this indicator being shown.
Misc
Get/set the scheduler's read-only state. When set to true, any UIs for modifying data are disabled.
By default, scrolling the schedule will update the timelineContext to reflect the new
currently hovered context. When displaying a large number of events on screen at the same time, this will
have a slight impact on scrolling performance. In such scenarios, opt out of this behavior by setting
this config to false.
Other
Gets the count of events within a date range between current startDate and endDate.
Set to true for child nodes in a tree store to inherit their parent´s eventColor
mode.This property yields a Menu configuration block which encapsulates the range choices which this widget may be set to encapsulate:
- day
- week
- month
- year
- decade
By default a list view adds these choices to the header context menu.
An agenda view creates a floating settings button which offers this menu.
The property may be used to create a custom UI for changing the range.
The value yielded by the default get listRangeMenu() implementation looks like this:
{
items : {
listRangeDayItem : {config for DAY range menu item },
listRangWeekItem : {config for WEEK range menu item },
listRangMonthItem : {config for MONTH range menu item },
listRangeYearItem : {config for YEAR range menu item },
listRangeDecadeItem : {config for DECADE range menu item }
}
}
A subclass can override get listRangeMenu() and mutate the object returned by the super call.
For example, it could delete properties of the items block to limit which ranges may be selected.
The time range encapsulated by the current date.
When a range is used, changing the date snaps the startDate
to the closest starting date of the range. For Example if the range was configured as '1 week'
then setting the date to the date of next Wednesday would mean that the startDate
would be the start of next week, and an entire week would be encapsulated by this view.
Configure UI transitions for various actions in the grid.
| Parameter | Type | Description |
|---|---|---|
insertRecord | Boolean | Transition record insertions |
removeRecord | Boolean | Transition record removals |
toggleColumn | Boolean | Transition column visibility changes |
expandCollapseColumn | Boolean | Transition parent/group column expand/collapse |
toggleRegion | Boolean | Transition region expand/collapse |
toggleTreeNode | Boolean | Transition tree node expand/collapse |
toggleGroup | Boolean | Transition group expand/collapse |
filterRemoval | Boolean | Transition row removals caused by filtering (under specific conditions) |
removeEvent | Boolean | Transition event removals |
changeEvent | Boolean | Transition event changes |
Resources
Returns an object defining the range of visible resources
| Parameter | Type | Description |
|---|---|---|
visibleResources.first | ResourceModel | First visible resource |
visibleResources.last | ResourceModel | Last visible resource |
Scheduled events
Set to false if you don't want to allow events overlapping times for any one resource (defaults to true).
If this config is set, then its gesture property (which defaults to dblclick) creates a
new event at the mouse or touch event's time point.
When set to true, the gesture is dblclick, and the new event will have a duration of 1 time axis tick.
This may be specified as the string DOM event name to listen for, such as 'click', 'dblclick'
and the new event will have a duration of 1 time axis tick.
The duration of the new event can be set by specifying the duration property as a DurationConfig.
If that is not set, then setting the useEventModelDefaults property will cause the duration
to be specified by the default values of the duration and
durationUnit fields
Example:
new Scheduler({
autoCreate : {
gesture : 'click',
duration : '2 hours',
newName : 'New appointment'
}
});
| Parameter | Type | Description |
|---|---|---|
autoCreate.gesture | click | dblclick | The gesture to trigger auto creation of an event. Defaults to |
autoCreate.useEventModelDefaults | Boolean | Set to |
autoCreate.snapType | round | ceil | floor | The type of snapping to apply to the event start date. If omitted, the date will be floored to the time axis resolution. |
autoCreate.step | DurationConfig | String | The increment to snap the event start date to. |
autoCreate.duration | DurationConfig | String | The duration of the event to create. Defaults to 1 time axis tick. |
autoCreate.name | String | The name of the event to create. Defaults to the |
CSS
Dates
DOM
Infinite scroll
Layout
Milestones
Scrolling
Selection
State
Time axis
Tree
Widget hierarchy
Functions
204
Functions
204Calendar integration
Interface method used by an encapsulating Calendar view to implement the "next" button.
Interface method used by an encapsulating Calendar view to implement the "prev" button.
Dates
Checks if a date range is allocated or not for a given resource.
| Parameter | Type | Description |
|---|---|---|
startDate | Date | The start date |
endDate | Date | The end date |
excludeEvent | EventModel | null | An event to exclude from the check (or null) |
resourceRecord | ResourceModel | ResourceModel[] | A resource or an array of resource records |
allowOverlap | Boolean | True to allow checking for availability ignoring overlapping events. Defaults to the Scheduler's allowOverlap setting. |
True if the timespan is available for the resource(s)
Events
Returns an array of events for the date range specified by the startDate and endDate options.
By default, for any date, this includes any event which intersects that date.
To only include events that are fully contained within the date range, pass the allowPartial
option as false.
By default, any occurrences of recurring events are included in the resulting array (not applicable in Gantt). If
that is not required, pass the includeOccurrences option as false.
includeOccurrences is true, the start date and end date options are mandatory.
The method must know what range of occurrences needs to be generated and returned.Example:
visibleEvents = eventStore.getEvents({
resourceRecord : myResource,
startDate : scheduler.timeAxis.startDate,
endDate : scheduler.timeAxis.endDate
});
| Parameter | Type | Description |
|---|---|---|
options | Object | An options object determining which events to return |
options.date | Date | If only one date is required, pass this option instead of the
|
options.startDate | Date | The start date for the range of events to include. |
options.endDate | Date | The end date for the range of events to include. Defaults to a startDate + one day range if only startDate passed |
options.resourceRecord | ResourceModel | Pass a resource to only return events assigned to
this resource. Not supported when using the |
options.filter | function | A function to filter out events which are not required. |
options.ignoreFilters | Boolean | By default, store filters are honoured. Pass this
as |
options.includeOccurrences | Boolean | Occurrences of recurring events are included by default. |
options.allowPartial | Boolean | Events which start before or after the range, but intersect the range are included by default. |
options.startOnly | Boolean | Pass |
options.silent | Boolean | Pass |
options.onlyAssigned | Boolean | Pass |
options.dateMap | Boolean | Map | Populates the passed |
Events which match the passed configuration.
Feature shortcuts
Opens an editor UI to edit the passed event, or a config object for a new event.
NOTE: Only available when the EventEdit feature is enabled.
| Parameter | Type | Description |
|---|---|---|
eventRecord | EventModel | EventModelConfig | String | Number | Event to edit |
resourceRecord | ResourceModel | The Resource record for the event. This parameter is needed if the event is newly created for a resource and has not been assigned, or when using multi assignment. |
element | HTMLElement | Element to anchor editor to (defaults to events element) |
Returns the dependency record for a DOM element
NOTE: Only available when the Dependencies feature is enabled.
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement | The dependency line element |
The dependency record
Rendering
Triggers a render of all the cells (in horizontal mode) in and event bars for the passed resource.
Since Scheduler uses virtualized resources, calling this method for a resource that is not currently rendered will not have any effect.
| Parameter | Type | Description |
|---|---|---|
resourceRecord | ResourceModel | The resource that should be refreshed |
Triggers a render of all the cells (in horizontal mode) and event bars for the passed resources. Leave the argument out to refresh all resources.
Since Scheduler uses virtualized resources, calling this method for resources that are not currently rendered will not have any effect.
| Parameter | Type | Description |
|---|---|---|
resourceRecords | ResourceModel[] | The resources that should be refreshed |
Resumes UI refresh on store operations.
Multiple calls to suspendRefresh stack up, and will require an equal number of resumeRefresh calls to
actually resume UI refresh.
Specify true as the first param to trigger a refresh if this call unblocked the refresh suspension.
If the underlying project is calculating changes, the refresh will be postponed until it is done.
| Parameter | Type | Description |
|---|---|---|
trigger | Boolean | Pass |
Scheduled events
Creates an event on the specified date which conforms to the autoCreate setting for the specified resource. The event is then scrolled into view.
NOTE: If the scheduler is readonly, or resource type is invalid (group header), or if allowOverlap is false
and slot is already occupied - no event is created.
This method may be called programmatically by application code if the autoCreate
setting is false, in which case the default values for autoCreate will be used.
If the EventEdit feature is active, the new event will be displayed in the event editor.
| Parameter | Type | Description |
|---|---|---|
date | Date | The date to add the event at. |
resourceRecord | ResourceModel | The resource to create the event for. |
Called when new event is created. Сan be overridden to supply default record values etc.
| Parameter | Type | Description |
|---|---|---|
eventRecord | EventModel | Newly created event |
Assigns and schedules an unassigned event record (+ adds it to this Scheduler's event store unless already in it).
| Parameter | Type | Description |
|---|---|---|
config | Object | The config containing data about the event record to schedule |
config.startDate | Date | The start date |
config.eventRecord | EventModel | EventModelConfig | Event (or data for it) to assign and schedule |
config.parentEventRecord | EventModel | Parent event to add the event to (to nest it), only applies when using the NestedEvents feature |
config.resourceRecord | ResourceModel | Resource to assign the event to |
config.element | HTMLElement | The element if you are dragging an element from outside the scheduler |
Configuration
DOM
Getters
Milestones
Misc
Other
Rows
Scrolling
Selection
Widget hierarchy
Zoom
Events
93
Events
93This event fires whenever the autoCreate gesture is detected.
This event is preventable and may be used to validate autoCreate-initiated event creation.
// Adding a listener using the "on" method
schedulerBase.on('beforeAutoCreate', ({ domEvent, date, resourceRecord }) => {
});| Parameter | Type | Description |
|---|---|---|
domEvent | Event | The DOM event which initiated the creation. |
date | Date | The starting time of the event to be created. |
resourceRecord | ResourceModel | The resource if the UI includes a resource. |
Fires before an event is added. Can be triggered by schedule double click or drag create action.
// Adding a listener using the "on" method
schedulerBase.on('beforeEventAdd', ({ source, eventRecord, resourceRecords, assignmentRecords }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
eventRecord | EventModel | The record about to be added |
resourceRecords | ResourceModel[] | Resources that the record is assigned to |
assignmentRecords | AssignmentModel[] | The assignment records |
Fired when a double click or drag gesture has created a new event and added it to the event store.
// Adding a listener using the "on" method
schedulerBase.on('eventAutoCreated', ({ source, eventRecord, resourceRecord }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler. |
eventRecord | EventModel | The new event record. |
resourceRecord | ResourceModel | The resource assigned to the new event. |
Triggered when a keydown event is observed if there are selected events.
// Adding a listener using the "on" method
schedulerBase.on('eventKeyDown', ({ source, eventRecords, assignmentRecords, event }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecords | EventModel[] | The selected event records |
assignmentRecords | AssignmentModel[] | The selected assignment records |
event | KeyboardEvent | Browser event |
Triggered when a keyup event is observed if there are selected events.
// Adding a listener using the "on" method
schedulerBase.on('eventKeyUp', ({ source, eventRecords, assignmentRecords, event }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecords | EventModel[] | The selected event records |
assignmentRecords | AssignmentModel[] | The selected assignment records |
event | KeyboardEvent | Browser event |
Fired after releasing an event, useful to cleanup of custom content added on renderEvent or in eventRenderer.
// Adding a listener using the "on" method
schedulerBase.on('releaseEvent', ({ source, eventRecord, resourceRecord, assignmentRecord, renderData, element }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecord | EventModel | The event record |
resourceRecord | ResourceModel | The resource record |
assignmentRecord | AssignmentModel | The assignment record |
renderData | Object | An object containing details about the event rendering |
element | HTMLElement | The event bar element |
Fired after rendering an event, when its element is available in DOM.
// Adding a listener using the "on" method
schedulerBase.on('renderEvent', ({ source, eventRecord, resourceRecord, assignmentRecord, renderData, isRepaint, isReusingElement, element }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecord | EventModel | The event record |
resourceRecord | ResourceModel | The resource record |
assignmentRecord | AssignmentModel | The assignment record |
renderData | Object | An object containing details about the event rendering, see eventRenderer for details |
isRepaint | Boolean |
|
isReusingElement | Boolean |
|
element | HTMLElement | The event bar element |
Fired when clicking a resource header cell
// Adding a listener using the "on" method
schedulerBase.on('resourceHeaderClick', ({ source, resourceRecord, event }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
resourceRecord | ResourceModel | The resource record |
event | Event | The event |
Fired when double clicking a resource header cell
// Adding a listener using the "on" method
schedulerBase.on('resourceHeaderDblclick', ({ source, resourceRecord, event }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
resourceRecord | ResourceModel | The resource record |
event | Event | The event |
Fired when the shiftIncrement of this view changes.
// Adding a listener using the "on" method
schedulerBase.on('shiftIncrementChange', ({ source, old, new }) => {
});| Parameter | Type | Description |
|---|---|---|
source | TimelineBase | This Scheduler/Gantt instance. |
old | Object | The shift increment if any. |
new | Object | The shift increment |
Event handlers
93
Event handlers
93This event called whenever the autoCreate gesture is detected.
This event is preventable and may be used to validate autoCreate-initiated event creation.
new SchedulerBase({
onBeforeAutoCreate({ domEvent, date, resourceRecord }) {
}
});| Parameter | Type | Description |
|---|---|---|
domEvent | Event | The DOM event which initiated the creation. |
date | Date | The starting time of the event to be created. |
resourceRecord | ResourceModel | The resource if the UI includes a resource. |
Called before an event is added. Can be called by schedule double click or drag create action.
new SchedulerBase({
onBeforeEventAdd({ source, eventRecord, resourceRecords, assignmentRecords }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
eventRecord | EventModel | The record about to be added |
resourceRecords | ResourceModel[] | Resources that the record is assigned to |
assignmentRecords | AssignmentModel[] | The assignment records |
Called when a double click or drag gesture has created a new event and added it to the event store.
new SchedulerBase({
onEventAutoCreated({ source, eventRecord, resourceRecord }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler. |
eventRecord | EventModel | The new event record. |
resourceRecord | ResourceModel | The resource assigned to the new event. |
Called when a keydown event is observed if there are selected events.
new SchedulerBase({
onEventKeyDown({ source, eventRecords, assignmentRecords, event }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecords | EventModel[] | The selected event records |
assignmentRecords | AssignmentModel[] | The selected assignment records |
event | KeyboardEvent | Browser event |
Called when a keyup event is observed if there are selected events.
new SchedulerBase({
onEventKeyUp({ source, eventRecords, assignmentRecords, event }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecords | EventModel[] | The selected event records |
assignmentRecords | AssignmentModel[] | The selected assignment records |
event | KeyboardEvent | Browser event |
Called after releasing an event, useful to cleanup of custom content added on renderEvent or in eventRenderer.
new SchedulerBase({
onReleaseEvent({ source, eventRecord, resourceRecord, assignmentRecord, renderData, element }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecord | EventModel | The event record |
resourceRecord | ResourceModel | The resource record |
assignmentRecord | AssignmentModel | The assignment record |
renderData | Object | An object containing details about the event rendering |
element | HTMLElement | The event bar element |
Called after rendering an event, when its element is available in DOM.
new SchedulerBase({
onRenderEvent({ source, eventRecord, resourceRecord, assignmentRecord, renderData, isRepaint, isReusingElement, element }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
eventRecord | EventModel | The event record |
resourceRecord | ResourceModel | The resource record |
assignmentRecord | AssignmentModel | The assignment record |
renderData | Object | An object containing details about the event rendering, see eventRenderer for details |
isRepaint | Boolean |
|
isReusingElement | Boolean |
|
element | HTMLElement | The event bar element |
Called when clicking a resource header cell
new SchedulerBase({
onResourceHeaderClick({ source, resourceRecord, event }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
resourceRecord | ResourceModel | The resource record |
event | Event | The event |
Called when double clicking a resource header cell
new SchedulerBase({
onResourceHeaderDblclick({ source, resourceRecord, event }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | This Scheduler |
resourceRecord | ResourceModel | The resource record |
event | Event | The event |
Called when the shiftIncrement of this view changes.
new SchedulerBase({
onShiftIncrementChange({ source, old, new }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | TimelineBase | This Scheduler/Gantt instance. |
old | Object | The shift increment if any. |
new | Object | The shift increment |
Typedefs
22
Typedefs
22Type containing start and end constraints.
| Parameter | Type | Description |
|---|---|---|
start | Date | Start date constraint |
end | Date | End date constraint |
Configuration object for a responsive level. Contains a required levelWidth plus any
SchedulerState properties to apply when this level is active.
| Parameter | Type | Description |
|---|---|---|
levelWidth | Number | String | The width threshold for this level, or |