The visibleEnd() method returns the date/time end of the Scheduler grid.
DayPilot.Scheduler.visibleEnd();
DayPilot.Date object.
To get the end of the current viewport, use getViewPort() method.