EventEdit

Feature that displays a popup containing fields for editing event data.

To customize its contents you can:

  • Reconfigure built-in widgets by providing override configs in the items config.
  • Change the date format of the date & time fields: dateFormat and timeFormat
  • Configure provided fields in the editor and add your own in the items config.
  • Remove fields related to recurring events configuration (such as recurrenceCombo) by setting showRecurringUI config to false.
  • Advanced: Reconfigure the whole editor widget using editorConfig

For more info on customizing the event editor, please see Customize event editor guide.

Event editor
//<code-header>
fiddle.title = 'Event editor';
//</code-header>
const calendar = new Calendar({
    appendTo : targetElement,
    height   : 700,

    // We have a little less width in our context, so reduce the responsive breakpoints
    responsive : {
        small : {
            when : 480
        },
        medium : {
            when : 640
        }
    },

    // Start life looking at this date
    date : '2020-03-01',

    // Used to create view titles
    dateFormat : 'DD MMM YYYY',

    // CrudManager arranges loading and syncing of data in JSON form from/to a web service
    crudManager : {
        transport : {
            load : {
                url : 'data/Calendar/examples/feature/company-events.json'
            }
        },
        autoLoad : true
    },

    // Features named by the properties are included.
    // An object is used to configure the feature.
    features : {
        eventEdit : {
            // items is the config for editor widgets. It is merged into provided editor items.
            // We may knock out a provided item using false.
            // We may alter the configuration of a provided item using an object.
            items : {
                // Hide the "All Day" checkbox for this application.
                allDay : null,

                // Field label "Owner" instead of "Calendar" which is the default
                resourceField : {
                    label : 'Owner'
                }
            }
        }
    },

    // Modes are the views available in the Calendar.
    // An object is used to configure the view.
    modes : {
        agenda : null,
        year   : null,
        week   : {
            dayStartTime : 8
        },
        day : {
            dayStartTime : 8
        }
    }
});

This feature is enabled by default.

Configs

23

Common

disabledInstancePlugin
listenersEvents

Editor

editorConfigEventEdit
triggerEventEventEdit
typeFieldEventEdit

Editor widgets

dateFormatEditBase
itemsEditBase
timeFormatEditBase

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

minEditSizeEventEdit
readOnlyEventEdit
weekStartDayEditBase

Recurring

showRecurringUIRecurringEventEdit

Properties

34

Common

disabledInstancePlugin

Class hierarchy

isEventEdit: Boolean= truereadonly
Identifies an object as an instance of EventEdit class, or subclass thereof.
isEventEdit: Boolean= truereadonlystatic
Identifies an object as an instance of EventEdit class, or subclass thereof.
isEditBaseEditBase
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable
isRecurringEventEditRecurringEventEdit

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

cancelButtonEventEdit
deleteButtonEventEdit
editorEventEdit
editRecurrenceButtonRecurringEventEdit
endDateFieldEventEdit
endTimeFieldEventEdit
eventRecordEventEdit
isEditingEventEdit
minEditSizeEventEdit
nameFieldEventEdit
readOnlyEventEdit
recurrenceComboRecurringEventEdit
resourceFieldEventEdit
saveButtonEventEdit

Functions

31

Other

Opens an editor for the passed event. This function is exposed on Calendar and can be called as calendar.editEvent().

If the event is not present in the eventStore, the event will be added so that it becomes visible in the UI. The editor will then shows a "Cancel" button which removes the event when clicked to abort a "New Event" operation.

ParameterTypeDescription
eventRecordEventModel

Event to edit

resourceRecordResourceModel

Not used. Inherited from Scheduler.

elementHTMLElement

Element to anchor editor to (defaults to events element)

LstaticLocalizable
onEvents
onAfterSaveEditBase
onBeforeSaveEditBase
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

11
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

11

Typedefs

1