The toDate() method returns a Date object that holds the DayPilot.Date value as UTC time.
DayPilot.Date.toDate()Returns a Date object that represents the DayPilot.Date value as UTC time.
The returned object preserves the same UTC timestamp stored by DayPilot.Date. As shown in the example below, calling toISOString() on the result produces the original ISO value.
const today = DayPilot.Date.today(); // DayPilot.Date {value: "2018-01-01T00:00:00"}
const todayString = today.toString(); // "2018-01-01T00:00:00"
const utcToday = today.toDate(); // Mon Jan 01 2018 01:00:00 GMT+0100 (Central European Standard Time)
const utcTodayString = utcToday.toISOString(); // "2018-01-01T00:00:00.000Z"