The onRowEdit event handler fires when inline row editing of a JavaScript Scheduler row header cell finishes, before the default action configured by DayPilot.Scheduler.rowEditHandling is performed.
DayPilot.Scheduler.onRowEdit(args)args.async (boolean) - set this value to true to continue processing asynchronously; call args.loaded() when the custom logic is finished
args.canceled (boolean, read-only) - indicates that the user pressed <esc> to cancel editing
args.newText (string) - edited text; since 2023.1.5513 you can modify this value before the default action runs
args.row (DayPilot.Row) - edited row; prior to version 2207 it was available as args.resource
args.x (number) - row header column index (if row header columns are defined; available since 2023.1.5513)
args.loaded() - notifies the Scheduler that event handling should continue after asynchronous processing
args.preventDefault() - cancels the default action defined by DayPilot.Scheduler.rowEditHandling
The updated value is submitted when the row editing input loses focus or when the user presses <enter>. Pressing <esc> cancels editing, sets args.canceled to true, and leaves the cell value unchanged.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
rowEditHandling: "Update",
onRowEdit: (args) => {
args.newText = args.newText.trim();
if (!args.newText) {
args.preventDefault();
}
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
rowEditHandling: "Update",
onRowEdit: (args) => {
args.newText = args.newText.trim();
if (!args.newText) {
args.preventDefault();
}
},
// ...
};React
<DayPilotScheduler
rowEditHandling="Update"
onRowEdit={onRowEdit}
{/* ... */}
/>const onRowEdit = (args) => {
args.newText = args.newText.trim();
if (!args.newText) {
args.preventDefault();
}
};Vue
<DayPilotScheduler
rowEditHandling="Update"
@rowEdit="onRowEdit"
<!-- ... -->
/>const onRowEdit = (args) => {
args.newText = args.newText.trim();
if (!args.newText) {
args.preventDefault();
}
};Row Editing [doc.daypilot.org]
DayPilot.Scheduler.onRowEdited