The visibleEnd() method returns the end of the last visible day.
DayPilot.Month.visibleEnd();
Returns a DayPilot.Date object.
const end = dp.visibleEnd();
DayPilot.Month Class
Availability of this API item in DayPilot editions: