The onTimeRangeSelected event handler fires when the user changes the selected date, after the target element has been updated.
DayPilot.DatePicker.onTimeRangeSelected(args)
args.date (DayPilot.Date) - the selected date
By the time this event fires, the linked target element already contains the new formatted value.
The DayPilot.DatePicker.select() method fires this event as well.
const picker = new DayPilot.DatePicker({
target: "start",
onTimeRangeSelected: (args) => {
console.log(args.date.toString("yyyy-MM-dd"));
},
// ...
});
picker.show();