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.
DayPilot.Scheduler.onKeyboardFocusChanged(args)args.focus - the current focus target
args.previous - the previous focus target
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.
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);
};Keyboard Support [doc.daypilot.org]
DayPilot.Scheduler.keyboard.move()
DayPilot.Scheduler.keyboard.getFocus()