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.
Declaration
DayPilot.Scheduler.onRowEdit(args)Parameters
args.async(boolean) - set this value totrueto continue processing asynchronously; callargs.loaded()when the custom logic is finishedargs.canceled(boolean, read-only) - indicates that the user pressed<esc>to cancel editingargs.newText(string) - edited text; since 2023.1.5513 you can modify this value before the default action runsargs.row(DayPilot.Row) - edited row; prior to version 2207 it was available asargs.resourceargs.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 processingargs.preventDefault()- cancels the default action defined by DayPilot.Scheduler.rowEditHandling
Notes
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.
Examples
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();
}
};See Also
Row Editing [doc.daypilot.org]
DayPilot.Scheduler.onRowEdited
DayPilot.Scheduler.rowEditHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot