The keyboard.getFocus() method gets the current keyboard focus of the JavaScript Scheduler.

Available since version 2021.3.5074.



Return Value

An object with the following properties:

  • e (DayPilot.Event) - if the focus target is an event, the e property holds the event details, otherwise it's null
  • cell - if the focus target is a cell, the cell property holds the cell details, otherwise it's null (cell properties: start, end, resource)

If the keyboard focus is not active, the method returns null.