react-multi-date-picker
react-multi-date-picker copied to clipboard
picker is not closing on modal
if you set a picker on modal, after focusing on input, picker shown up but clicking on outside of input like focusing on other inputs or modal itself, the picker not closed
Did you find any solution or workaround for it?
I had same issue. I'd added label element as parent of calendar. I fixed it by removing label element.
Hey! I had resolved this issue with hook. Add ref to your DatePicker component and use closeCalendar() method.
Example: useOnClickOutside(datePickerRef, () => datePickerRef.current?.closeCalendar());
@yahayahu would you please provide a simple example of useOnClickOutside on how to use that
@n-rezaei My case with reactstrap. I was created example on codesandbox. I added comment in Datepicker.jsx file for u.
I'm having the same issue with Chakra-UI modal.
@n-rezaei My case with reactstrap. I was created example on codesandbox. I added comment in Datepicker.jsx file for u.
You're the best, it works.