I am currently working with AirDatepicker v3.3.5 in my app.js file:
window.dateRangePicker = new AirDatepicker('.date-range', {
range: true,
maxDate: new Date(),
multipleDatesSeparator: ' - '
});
After referring to the documentation at , I realized that in my custom form.js, I need to apply onSelect and update methods like so:
dpMin = new AirDatepicker('#el1', {
onSelect({date}) {
dpMax.update({
minDate: date
})
}
})
Unfortunately, my initial attempt failed. I tried the following syntax:
window.dateRangePicker.onSelect({date}) {
...
};
However, I encountered an error:
Expecting new line or semicolon
I am wondering which syntax is actually valid in this case.