The onKeyboardFocusChanged event handler fires when the keyboard focus changes, either after the user presses an arrow key or when keyboard.move() is called.
It is called after the focus change.
Available since 2021.3.5075.
Declaration
DayPilot.Scheduler.onKeyboardFocusChanged(args)Parameters
args.focus- the current focus targetargs.previous- the previous focus target
Notes
The args.focus and args.previous properties use the same focus object structure as keyboard.getFocus(). Use this event when you need to react after Scheduler keyboard navigation has already updated the active focus target.
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onKeyboardFocusChanged: (args) => {
console.log("Keyboard focus changed", args.previous, args.focus);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onKeyboardFocusChanged: (args) => {
console.log("Keyboard focus changed", args.previous, args.focus);
},
// ...
};React
<DayPilotScheduler
onKeyboardFocusChanged={onKeyboardFocusChanged}
{/* ... */}
/>const onKeyboardFocusChanged = (args) => {
console.log("Keyboard focus changed", args.previous, args.focus);
};Vue
<DayPilotScheduler
@keyboardFocusChanged="onKeyboardFocusChanged"
<!-- ... -->
/>const onKeyboardFocusChanged = (args) => {
console.log("Keyboard focus changed", args.previous, args.focus);
};See Also
Keyboard Support [doc.daypilot.org]
DayPilot.Scheduler.keyboard.move()
DayPilot.Scheduler.keyboard.getFocus()
DayPilot.Scheduler.onKeyboardFocusChange
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot