The visibleEnd() method returns the end of the last visible day.
DayPilot.Month.visibleEnd();
DayPilot.Date object
var end = dp.visibleEnd();