The DayPilot.DatePicker constructor creates a date picker instance and initializes it using the supplied configuration object.
new DayPilot.DatePicker(options)options (object) - configuration object that holds DayPilot.DatePicker Properties and DayPilot.DatePicker Events used to initialize the instance
HTML
<span id="start"></span>
<a href="#" id="change-date">Change</a>JavaScript
const picker = new DayPilot.DatePicker({
target: "start",
pattern: "yyyy-MM-dd",
onTimeRangeSelected: args => {
dp.startDate = args.date;
dp.update();
}
});
document.getElementById("change-date").addEventListener("click", args => {
args.preventDefault();
picker.show();
});DayPilot.DatePicker Properties
React Calendar with Date Picker [code.daypilot.org]