The onEventEdit event handler fires when inline event editing submits new text in the Scheduler.
DayPilot.Scheduler.onEventEdit(args)args.async (boolean) - enables async processing; call args.loaded() to complete the action
args.control (DayPilot.Scheduler) - control instance
args.canceled (boolean) - submission status (read-only)
args.e (DayPilot.Event) - the edited event
args.newText (string) - new event text
args.loaded() - completes async processing
args.preventDefault() - cancels the default action
This event is also fired when unmodified text is submitted and when inline editing is canceled using the Escape key. When the edit is canceled, args.canceled is true.
For asynchronous processing, set args.async to true and call args.loaded() when your custom logic finishes.
api=1: In DayPilot.Scheduler.api legacy mode, the signature is onEventEdit(e, newText).
e (DayPilot.Event) - the event reference
newText (string) - new event text
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onEventEdit: (args) => {
if (args.canceled) {
return;
}
if (!args.newText.trim()) {
args.preventDefault();
}
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onEventEdit: (args) => {
if (args.canceled) {
return;
}
if (!args.newText.trim()) {
args.preventDefault();
}
},
// ...
};React
<DayPilotScheduler
onEventEdit={onEventEdit}
{/* ... */}
/>const onEventEdit = (args) => {
if (args.canceled) {
return;
}
if (!args.newText.trim()) {
args.preventDefault();
}
};Vue
<DayPilotScheduler
@eventEdit="onEventEdit"
<!-- ... -->
/>const onEventEdit = (args) => {
if (args.canceled) {
return;
}
if (!args.newText.trim()) {
args.preventDefault();
}
};Inline Event Editing [doc.daypilot.org]
DayPilot.Scheduler.onEventEditKeyDown
DayPilot.Scheduler.onEventEdited