-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Hello,
thanks for providing this library.
We are using your react wrapper for flatpickr with the monthSelectPlugin (https://flatpickr.js.org/plugins/#monthselectplugin).
Our code is roughly like that:
<Flatpickr
ref={flatPickrRef}
onChange={onFlatpickrChange}
options={{
plugins: [
monthSelectPlugin({
altFormat: "F Y",
dateFormat: "F Y",
shorthand: false,
}),
],
}}
/>This worked in version 3.10.13 of react-flatpickr. However, after updating to version 4.0.10 the month selector still works functionally, but throws an error whenever it closes:
TypeError: Cannot read properties of undefined (reading 'closeOnSelect')
❯ HTMLSpanElement.selectMonth ../../node_modules/flatpickr/dist/plugins/monthSelect/index.js:185:31
183| return; // necessary??
184| setMonth(eventTarget.dateObj);
185| if (fp.config.closeOnSelect) {
| ^
186| var single = fp.config.mode === "single";
187| var range = fp.config.mode === "range" && fp.selectedDates.length === 2;We would really appreciate if you could have a look into this :) Do you need any more information?
Metadata
Metadata
Assignees
Labels
No labels