You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to bind the 'select' and 'clear' events to my own functions. I can successfully bind 'select' but 'clear' does not bind. The online docs say 'clear' is an event, but the core/README does not list 'clear' as an event. I need a way to call a function when someone clicks Clear.
Describe the bug
I am trying to bind the 'select' and 'clear' events to my own functions. I can successfully bind 'select' but 'clear' does not bind. The online docs say 'clear' is an event, but the core/README does not list 'clear' as an event. I need a way to call a function when someone clicks Clear.
To Reproduce
this.picker = new easepick.create({
element: document.getElementById(arrivalId),
calendars: 2,
grid: 2,
format: 'MM-DD-YYYY',
locale: {
cancel: 'Clear'
},
autoApply: false,
css: [
'/lib/css/easepick.css'
],
plugins: [RangePlugin, LockPlugin],
RangePlugin: {
tooltipNumber(num) {
return num - 1;
},
locale: {
one: 'night',
other: 'nights',
cancel: 'Clear'
},
elementEnd:
#${departureId}
},
LockPlugin: {
minDate: new Date(),
maxDate: eighteenMonthsLater,
minDays: 2,
inseparable: true,
filter(date, picked) {
if (!Array.isArray(bookedDates) || bookedDates.length === 0) {
return false;
}
if (picked.length === 1) {
const incl = date.isBefore(picked[0]) ? '[)' : '(]';
return !picked[0].isSame(date, 'day') && date.inArray(bookedDates, incl);
}
} handleClear(e) {
console.log('handleClear triggered');
}
Expected behavior
I can see the handleApply console.log, but not the handleClear.
The text was updated successfully, but these errors were encountered: