The onEventEdit event handler fires when inline event editing is submitted in the JavaScript Calendar component, before the default edit action is performed.
Declaration
DayPilot.Calendar.onEventEdit(args)
Parameters
args.e(DayPilot.Event) - the edited eventargs.newText(string) - new event textargs.preventDefault()- cancels the default inline edit action
Notes
This event handles the submit step of inline event editing.
In api=1 mode, the legacy signature is onEventEdit(e, newText).
Examples
JavaScript
const calendar = new DayPilot.Calendar("dp", {
eventEditHandling: "Update",
onEventEdit: args => {
if (!args.newText.trim()) {
args.preventDefault();
}
},
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
eventEditHandling: "Update",
onEventEdit: args => {
if (!args.newText.trim()) {
args.preventDefault();
}
},
// ...
};React
<DayPilotCalendar
eventEditHandling="Update"
onEventEdit={onEventEdit}
{/* ... */}
/>const onEventEdit = (args) => {
if (!args.newText.trim()) {
args.preventDefault();
}
};Vue
<DayPilotCalendar eventEditHandling="Update" @eventEdit="onEventEdit" <!-- ... --> />
const onEventEdit = (args) => {
if (!args.newText.trim()) {
args.preventDefault();
}
};See Also
DayPilot.Calendar.onEventEdited
DayPilot.Calendar.eventEditHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot