The visibleEnd() method returns the end of the last visible day (date/time value).
DayPilot.Date object
var dp = new DayPilot.Calendar("dp");
// ...
dp.startDate = "2019-01-03";    // Thursday
dp.viewType = "Week";
dp.weekStart = 0;               // Sunday
dp.init();
var end = dp.visibleEnd();      // Sunday, 2019-01-05T00:00:00