DayPilot.Scheduler.onKeyboardFocusChange

The onKeyboardFocusChange event handler is fired when the keyboard focus changes (when the user hits one of the arrow keys or when keyboard.move() is called).

The event is called before the actual focus change. It is possible to cancel the focus change by calling args.preventDefault().

Available since version 2021.3.5075.

Declaration

DayPilot.Scheduler.onKeyboardFocusChange(args);

Parameters

  • args.focus - the new focus target (not yet active)
  • args.previous - the current focus target
  • args.preventDefault() - cancels the default action (the default action is defined for <escape> and <enter> keys)

The args.focus and args.previous properties hold a focus object with the same structure as the one returned by the keyboard.getFocus() method.