The onRowSelected event handler fires after row selection changes in the Scheduler UI, once the row has already been selected or unselected.
DayPilot.Scheduler.onRowSelected(args)args.row (DayPilot.Row) - object representing the row whose selection state changed
args.selected (boolean) - true if the row has just been selected; otherwise false
args.ctrl (boolean) - true if the Ctrl key is pressed
args.shift (boolean) - true if the Shift key is pressed
args.meta (boolean) - true if the Meta key is pressed
This handler runs after the default UI action, so args.selected reflects the new selection state of args.row. The modifier key flags let you distinguish single-row selection from multi-selection gestures.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
rowSelectHandling: "Update",
onRowSelected: (args) => {
console.log(args.row, args.selected);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
rowSelectHandling: "Update",
onRowSelected: (args) => {
console.log(args.row, args.selected);
},
// ...
};React
<DayPilotScheduler
rowSelectHandling="Update"
onRowSelected={onRowSelected}
{/* ... */}
/>const onRowSelected = (args) => {
console.log(args.row, args.selected);
};Vue
<DayPilotScheduler
rowSelectHandling="Update"
@rowSelected="onRowSelected"
<!-- ... -->
/>const onRowSelected = (args) => {
console.log(args.row, args.selected);
};