SimpleEventEdit
Feature that displays a text field to edit the event name.
//<code-header>
fiddle.title = 'Simple event edit';
//</code-header>
targetElement.innerHTML = '<p>Double click an event to show the simple editor, or double click the empty schedule area to create a new event:</p>';
const scheduler = new Scheduler({
appendTo : targetElement,
// makes scheduler as high as it needs to be to fit rows
autoHeight : true,
startDate : new Date(2026, 4, 6),
endDate : new Date(2026, 4, 13),
columns : [
{ field : 'name', text : 'Name', width : 100 }
],
resources : [
{ id : 1, name : 'Volvo' },
{ id : 2, name : 'Saab' }
],
events : [
{ id : 1, resourceId : 1, name : 'Double click me', startDate : '2026-05-08', endDate : '2026-05-11' },
{ id : 2, resourceId : 2, name : 'Or me', startDate : '2026-05-08', endDate : '2026-05-11', eventStyle : 'bordered' }
],
features : {
eventEdit : false,
simpleEventEdit : true
}
});You can control the flow of this by listening to the events relayed by this class from the underlying Editor.
To use this feature, you also need to disable the built-in default editing feature:
const scheduler = new Scheduler({
features : {
eventEdit : false,
simpleEventEdit : true
}
});
This feature is disabled by default. For info on enabling it, see GridFeatures.
Configs
12
Configs
12Editor
The editor configuration, where you can control which widget to show
The EventModel field to edit
The event that shall trigger showing the editor. Defaults to eventDblClick, set to '' or null to
disable editing of existing events.
Misc
Other
Properties
16
Properties
16Common
Class hierarchy
Other
The current EventModel record, which is being edited by the event editor.
Functions
29
Functions
29Other
Opens an Editor for the passed event. This function is exposed on Scheduler and can be called as
scheduler.editEvent().
| Parameter | Type | Description |
|---|---|---|
eventRecord | EventModel | String | Number | Event to edit or the id of the eventRecord. When a String or Number is passed, it must be the id of an event that exists in the Scheduler's event store. |
resourceRecord | ResourceModel | The Resource record for the event. |
Configuration
Events
Misc
Events
11
Events
11Fired when cancellation has been requested, either by ESC, or focus loss (if configured to cancel on blur).
The cancellation may be vetoed, in which case, focus is moved back into the editor.
// Adding a listener using the "on" method
simpleEventEdit.on('beforeCancel', ({ oldValue, value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Fired when an edit completion has been requested, either by ENTER, or focus loss (if configured to complete on blur).
The completion may be vetoed, in which case, focus is moved back into the editor.
// Adding a listener using the "on" method
simpleEventEdit.on('beforeComplete', ({ oldValue, value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Fired before the editor is shown to start an edit operation. Returning false from a handler vetoes the edit operation.
// Adding a listener using the "on" method
simpleEventEdit.on('beforeStart', ({ value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
value | Object | The value to be edited. |
source | Editor | The Editor that triggered the event. |
Edit has been canceled without updating the associated record or element.
// Adding a listener using the "on" method
simpleEventEdit.on('cancel', ({ oldValue, value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The value of the field. |
source | Editor | The Editor that triggered the event. |
Edit has been completed, and any associated record or element has been updated.
// Adding a listener using the "on" method
simpleEventEdit.on('complete', ({ oldValue, value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Fired when an edit operation has begun.
// Adding a listener using the "on" method
simpleEventEdit.on('start', ({ value, source }) => {
});| Parameter | Type | Description |
|---|---|---|
value | Object | The starting value of the field. |
source | Editor | The Editor that triggered the event. |
Event handlers
11
Event handlers
11Called when cancellation has been requested, either by ESC, or focus loss (if configured to cancel on blur).
The cancellation may be vetoed, in which case, focus is moved back into the editor.
new SimpleEventEdit({
onBeforeCancel({ oldValue, value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Called when an edit completion has been requested, either by ENTER, or focus loss (if configured to complete on blur).
The completion may be vetoed, in which case, focus is moved back into the editor.
new SimpleEventEdit({
onBeforeComplete({ oldValue, value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Called before the editor is shown to start an edit operation. Returning false from a handler vetoes the edit operation.
new SimpleEventEdit({
onBeforeStart({ value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
value | Object | The value to be edited. |
source | Editor | The Editor that triggered the event. |
Edit has been canceled without updating the associated record or element.
new SimpleEventEdit({
onCancel({ oldValue, value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The value of the field. |
source | Editor | The Editor that triggered the event. |
Edit has been completed, and any associated record or element has been updated.
new SimpleEventEdit({
onComplete({ oldValue, value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
oldValue | Object | The original value. |
value | Object | The new value. |
source | Editor | The Editor that triggered the event. |
Called when an edit operation has begun.
new SimpleEventEdit({
onStart({ value, source }) {
}
});| Parameter | Type | Description |
|---|---|---|
value | Object | The starting value of the field. |
source | Editor | The Editor that triggered the event. |
Typedefs
1
Typedefs
1CSS variables
1
CSS variables
1| Name | Description |
|---|---|
--b-simple-event-edit-editor-background | Background of the editor |