DayPilot.Scheduler.getViewPort

Gets information about the currently visible Scheduler viewport.

Return value

Returns an object with the following properties:

  • start (DayPilot.Date) - start of the viewport as date/time
  • end (DayPilot.Date) - end of the viewport as date/time
  • resources (array of strings) - resource IDs
  • topLeft - object with information about the cell in the top-left corner (see below; since 2019.2.3880)
  • bottomRight - object with information about the cell in the bottom-right corner (see below; since 2019.2.3880)

Cell object:

  • start (DayPilot.Date) - start of the cell as date/time
  • end (DayPilot.Date) - end of the cell as date/time
  • resource (string) - resource ID
  • x (number) - X position of the cell in the grid
  • y (number) - Y position of the cell in the grid