RecurringEvents

Configs

2

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.

Scheduled events

enableRecurringEvents: Boolean | Object= false

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).

ParameterTypeDescription
defaultActionsingle | future

Properties

3

Class hierarchy

isRecurringEvents: Boolean= truereadonly
Identifies an object as an instance of RecurringEvents class, or subclass thereof.
isRecurringEvents: Boolean= truereadonlystatic
Identifies an object as an instance of RecurringEvents class, or subclass thereof.

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

Returns occurrences of the provided recurring event across the date range of this Scheduler.

ParameterTypeDescription
recurringEventTimeSpan

Recurring event for which occurrences should be retrieved.

Returns: TimeSpan[] -

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

Fires 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 }) => {

});
ParameterTypeDescription
sourceScheduler

The Scheduler instance

assignmentRecordsAssignmentModel[]

The assignment records about to be deleted

contextObject

Additional removal context:

context.finalizefunction

Function to call to finalize the removal. Used to asynchronously decide to remove the records or not. Provide false to the function to prevent the removal.

context.finalize.removeRecordsBoolean

Provide false to the function to prevent the removal.

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 }) => {

});
ParameterTypeDescription
sourceScheduler

The Scheduler instance

eventRecordsEventModel[]

The records about to be deleted

contextObject

Additional removal context:

context.finalizefunction

Function to call to finalize the removal. Used to asynchronously decide to remove the records or not. Provide false to the function to prevent the removal.

context.finalize.removeRecordsBoolean

Provide false to the function to prevent the removal.

Event handlers

2

Called 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 }) {

    }
});
ParameterTypeDescription
sourceScheduler

The Scheduler instance

assignmentRecordsAssignmentModel[]

The assignment records about to be deleted

contextObject

Additional removal context:

context.finalizefunction

Function to call to finalize the removal. Used to asynchronously decide to remove the records or not. Provide false to the function to prevent the removal.

context.finalize.removeRecordsBoolean

Provide false to the function to prevent the removal.

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 }) {

    }
});
ParameterTypeDescription
sourceScheduler

The Scheduler instance

eventRecordsEventModel[]

The records about to be deleted

contextObject

Additional removal context:

context.finalizefunction

Function to call to finalize the removal. Used to asynchronously decide to remove the records or not. Provide false to the function to prevent the removal.

context.finalize.removeRecordsBoolean

Provide false to the function to prevent the removal.