The onTimeRangeSelected event handler fires when the user changes the selected date, after the target element has been updated.
Declaration
DayPilot.DatePicker.onTimeRangeSelected(args)
Parameters
args.date(DayPilot.Date) - the selected date
Notes
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.
Example
const picker = new DayPilot.DatePicker({
target: "start",
onTimeRangeSelected: (args) => {
console.log(args.date.toString("yyyy-MM-dd"));
},
// ...
});
picker.show();
See Also
DayPilot.DatePicker.onTimeRangeSelect
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot