The onRowClick event handler fires when the user clicks a row header in the JavaScript Scheduler component, before the default action specified by rowClickHandling.
You can cancel that default action by calling args.preventDefault().
DayPilot.Scheduler.onRowClick(args)args.row (DayPilot.Row) - clicked row
args.x (number) - row header column index when row header columns are defined; available since 2023.1.5513
args.ctrl (boolean) - Ctrl key state
args.shift (boolean) - Shift key state
args.meta (boolean) - Meta key state
args.originalEvent (MouseEvent) - original click event object (available since 2023.4.5756)
args.preventDefault() - cancels the default action specified by rowClickHandling
JavaScript
const dp = new DayPilot.Scheduler("dp", {
rowClickHandling: "Enabled",
onRowClick: (args) => {
console.log("Clicked row", args.row);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
rowClickHandling: "Enabled",
onRowClick: (args) => {
console.log("Clicked row", args.row);
},
// ...
};React
<DayPilotScheduler
rowClickHandling="Enabled"
onRowClick={onRowClick}
{/* ... */}
/>const onRowClick = (args) => {
console.log("Clicked row", args.row);
};Vue
<DayPilotScheduler
rowClickHandling="Enabled"
@rowClick="onRowClick"
<!-- ... -->
/>const onRowClick = (args) => {
console.log("Clicked row", args.row);
};DayPilot.Scheduler.rowClickHandling
Availability of this API item in DayPilot editions:
| Lite | Pro | |
|---|---|---|
| DayPilot for JavaScript |
Lite args missing: x