RecurringEvents
Configs
2
Configs
2Other
The confirmation dialog shown when a recurring event is edited.
The user is given the opportunity to either change just the occurrence being edited, or all occurrences from that point onwards.
The {Scheduler.view.recurrence.RecurrenceConfirmationPopup} may be reconfigured from its default configuration by specifying a config object here.
Scheduled events
Enables showing occurrences of recurring events across the scheduler's time axis. If you want to disable
the recurrence popup, you can choose set the defaultAction to future to affect all future
occurrences, or single to just affect the currently selected event.
Enables extra recurrence UI fields in the system-provided event editor (not in Scheduler Pro's task editor).
| Parameter | Type | Description |
|---|---|---|
defaultAction | single | future |
Properties
3
Properties
3Class hierarchy
Other
The confirmation dialog shown when a recurring event is edited.
The user is given the opportunity to either change just the occurrence being edited, or all occurrences from that point onwards.
The {Scheduler.view.recurrence.RecurrenceConfirmationPopup} may be reconfigured from its default configuration by specifying a config object here.
Functions
1
Functions
1Returns occurrences of the provided recurring event across the date range of this Scheduler.
| Parameter | Type | Description |
|---|---|---|
recurringEvent | TimeSpan | Recurring event for which occurrences should be retrieved. |
Array of the provided timespans occurrences.
Empty if the passed event is not recurring, or has no occurrences in the date range.
If the date range encompasses the start point, the recurring event itself will be the first entry.
Events
2
Events
2Fires before an assignment is removed. Can be triggered by user pressing [DELETE] or [BACKSPACE] or by the event editor. Can for example be used to display a custom dialog to confirm deletion, in which case records should be "manually" removed after confirmation:
scheduler.on({
async beforeAssignmentDelete({
assignmentRecords,
context
}) {
const result = await MessageDialog.confirm({
title : 'Please confirm',
message : 'Do you want to delete this assignment?'
});
context.finalize(result === MessageDialog.yesButton);
// Prevent default behaviour
return false;
}
});
// Adding a listener using the "on" method
recurringEvents.on('beforeAssignmentDelete', ({ source, assignmentRecords, context, context.finalize, context.finalize.removeRecords }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
assignmentRecords | AssignmentModel[] | The assignment records about to be deleted |
context | Object | Additional removal context: |
context.finalize | function | Function to call to finalize the removal.
Used to asynchronously decide to remove the records or not. Provide |
context.finalize.removeRecords | Boolean | Provide |
Fires before an event is removed. Can be triggered by user pressing [DELETE] or [BACKSPACE] or by the
event editor. Return false to immediately veto the removal (or a Promise yielding true or false
for async vetoing).
Can for example be used to display a custom dialog to confirm deletion, in which case records should be "manually" removed after confirmation:
scheduler.on({
async beforeEventDelete({
eventRecords,
context
}) {
const result = await MessageDialog.confirm({
title : 'Please confirm',
message : 'Do you want to delete this task?'
});
context.finalize(result === MessageDialog.yesButton);
// Prevent default behaviour
return false;
}
});
// Adding a listener using the "on" method
recurringEvents.on('beforeEventDelete', ({ source, eventRecords, context, context.finalize, context.finalize.removeRecords }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
eventRecords | EventModel[] | The records about to be deleted |
context | Object | Additional removal context: |
context.finalize | function | Function to call to finalize the removal.
Used to asynchronously decide to remove the records or not. Provide |
context.finalize.removeRecords | Boolean | Provide |
Event handlers
2
Event handlers
2Called before an assignment is removed. Can be called by user pressing [DELETE] or [BACKSPACE] or by the event editor. Can for example be used to display a custom dialog to confirm deletion, in which case records should be "manually" removed after confirmation:
scheduler.on({
async beforeAssignmentDelete({
assignmentRecords,
context
}) {
const result = await MessageDialog.confirm({
title : 'Please confirm',
message : 'Do you want to delete this assignment?'
});
context.finalize(result === MessageDialog.yesButton);
// Prevent default behaviour
return false;
}
});
new RecurringEvents({
onBeforeAssignmentDelete({ source, assignmentRecords, context }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
assignmentRecords | AssignmentModel[] | The assignment records about to be deleted |
context | Object | Additional removal context: |
context.finalize | function | Function to call to finalize the removal.
Used to asynchronously decide to remove the records or not. Provide |
context.finalize.removeRecords | Boolean | Provide |
Called before an event is removed. Can be called by user pressing [DELETE] or [BACKSPACE] or by the
event editor. Return false to immediately veto the removal (or a Promise yielding true or false
for async vetoing).
Can for example be used to display a custom dialog to confirm deletion, in which case records should be "manually" removed after confirmation:
scheduler.on({
async beforeEventDelete({
eventRecords,
context
}) {
const result = await MessageDialog.confirm({
title : 'Please confirm',
message : 'Do you want to delete this task?'
});
context.finalize(result === MessageDialog.yesButton);
// Prevent default behaviour
return false;
}
});
new RecurringEvents({
onBeforeEventDelete({ source, eventRecords, context }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Scheduler | The Scheduler instance |
eventRecords | EventModel[] | The records about to be deleted |
context | Object | Additional removal context: |
context.finalize | function | Function to call to finalize the removal.
Used to asynchronously decide to remove the records or not. Provide |
context.finalize.removeRecords | Boolean | Provide |