DayPilot.Scheduler.getViewport

The getViewport() method returns information about the current JavaScript Scheduler viewport.

Before version 2025.2.6458, this method was called getViewPort().

Declaration

DayPilot.Scheduler.getViewport()

Return Value

Returns an object with the following properties:

  • start (DayPilot.Date) - start of the viewport as date/time; null if the timeline is empty

  • end (DayPilot.Date) - end of the viewport as date/time; null if the timeline is empty

  • 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) - horizontal position of the cell in the grid

  • y (number) - vertical position of the cell in the grid

See Also

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript