EditBase

Base class for EventEdit. Not to be used directly.

Configs

16

Common

disabledInstancePlugin
listenersEvents

Editor

Default editor configuration, which widgets it shows etc.

This is the entry point into configuring any aspect of the editor.

The items configuration of a Container is deeply merged with its default items value. This means that you can specify an editorConfig object which configures the editor, or widgets inside the editor:

const scheduler = new Scheduler({
    features : {
        eventEdit  : {
            editorConfig : {
                autoClose : false,
                modal     : true,
                cls       : 'editor-widget-cls',
                items : {
                    resourceField : {
                        hidden : true
                    },
                    // Add our own event owner field at the top of the form.
                    // Weight -100 will make it sort top the top.
                    ownerField : {
                        weight : -100,
                        type   : 'usercombo',
                        name   : 'owner',
                        label  : 'Owner'
                    }
                },
                bbar : {
                    items : {
                        deleteButton : false
                    }
                }
            }
        }
    }
});

To configure the editor Panel to be docked, use the drawer config as shown below:

const scheduler = new Scheduler({
    features : {
        eventEdit  : {
            // Dock the editor to the inline-end side of the viewport
            editorConfig : {
                drawer : true
            }
        }
    }
});
saveAndCloseOnEnter: Boolean= true

True to save and close this panel if ENTER is pressed in one of the input fields inside the panel.

Editor widgets

dateFormat: String= L

This config parameter is passed to the startDateField and endDateField constructor.

items: Object<String, (ContainerItemConfig|Boolean|null)>

An object to merge with the provided items config of the editor to override the configuration of provided fields, or add new fields.

To remove existing items, set corresponding keys to null:

const scheduler = new Scheduler({
    features : {
        eventEdit  : {
            items : {
                // Merged with provided config of the resource field
                resourceField : {
                    label : 'Calendar'
                },
                recurrenceCombo : null,
                owner : {
                    weight : -100, // Will sort above system-supplied fields which are weight 0
                    type   : 'usercombo',
                    name   : 'owner',
                    label  : 'Owner'
                }
            }
        }
    }
});

The provided fields are called

  • nameField
  • resourceField
  • startDateField
  • startTimeField
  • endDateField
  • endTimeField
  • recurrenceCombo
  • editRecurrenceButton
timeFormat: String= LT

This config parameter is passed to the startTimeField and endTimeField constructor.

Other

By default, while editing, all clicks outside the editor will cancel the edit.

Set to true to begin editing a new event when an event bar is clicked.

This is normally used in combination with a docked editor, allowing interaction with the scheduler/calendar while editing.

weekStartDay: Number

The week start day used in all date fields of the feature editor form by default. 0 means Sunday, 6 means Saturday. Defaults to the locale's week start day.

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

15

Common

disabledInstancePlugin

Class hierarchy

isEditBase: Boolean= truereadonly
Identifies an object as an instance of EditBase class, or subclass thereof.
isEditBase: Boolean= truereadonlystatic
Identifies an object as an instance of EditBase class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

30

Other

Template method, intended to be overridden. Called after the event record has been updated.

ParameterTypeDescription
eventRecordEventModel

The event record

Template method, intended to be overridden. Called before the event record has been updated.

ParameterTypeDescription
eventRecordEventModel

The event record

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

6

Fires on the owning Scheduler after editor is closed by any action - save, delete or cancel

// Adding a listener using the "on" method
editBase.on('afterEventEdit', ({ source, action, eventEdit, eventRecord, resourceRecord, eventElement, editor }) => {

});
ParameterTypeDescription
sourceScheduler

The scheduler

actionsave | delete | cancel

The action that was taken to end the edit. One of 'save', 'delete' or 'cancel'

eventEditEventEdit

The eventEdit feature

eventRecordEventModel

The record that has been edited.

resourceRecordResourceModel

The Resource record for the event. If the event is being created, it will not contain a resource, so this parameter specifies the resource the event is being created for.

eventElementHTMLElement

The element which represents the event in the scheduler display.

editorPopup

The editor

catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

6

Called on the owning Scheduler after editor is closed by any action - save, delete or cancel

new EditBase({
    onAfterEventEdit({ source, action, eventEdit, eventRecord, resourceRecord, eventElement, editor }) {

    }
});
ParameterTypeDescription
sourceScheduler

The scheduler

actionsave | delete | cancel

The action that was taken to end the edit. One of 'save', 'delete' or 'cancel'

eventEditEventEdit

The eventEdit feature

eventRecordEventModel

The record that has been edited.

resourceRecordResourceModel

The Resource record for the event. If the event is being created, it will not contain a resource, so this parameter specifies the resource the event is being created for.

eventElementHTMLElement

The element which represents the event in the scheduler display.

editorPopup

The editor

onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1