The daysInMonth() method returns the number of days in the specified month.
DayPilot.Date.daysInMonth()Returns the number of days in the month of the current date.
const daysInFebruary = new DayPilot.Date("2020-02-01").daysInMonth(); // 29
const daysInMarch = new DayPilot.Date("2020-03-15").daysInMonth(); // 31