The lastDayOfMonth() method returns the start of the last day of the specified month.
DayPilot.Date.lastDayOfMonth();
DayPilot.Date object representing the start of the last day of month
var last = new DayPilot.Date("2020-02-01").lastDayOfMonth(); // new DayPilot.Date("2020-02-29T00:00:00")