afialapis / reactstrap-date-picker

A Reactstrap based, zero dependencies, date picker
MIT License
12 stars 6 forks source link

`calendarContainer` prop causes calendar to close unexpectedly #26

Closed JnnyRdng closed 1 year ago

JnnyRdng commented 1 year ago

I'm using the picker in a scrolling container which causes clipping issues. As per the docs, I've added calendarContainer={document.body} which solves the scrolling issue, but now clicking anywhere inside the calendar popup (e.g. clicking next/previous month) causes it to immediately close.

Have I misunderstood the usecase here or is there a fix I can use?

Any help is massively appreciated :)

Minimal example here: https://codesandbox.io/s/flamboyant-gates-qh64mk?file=/src/App.js

afialapis commented 1 year ago

Thanks for reporting and the example!

Should be fixed on 1.0.11.

https://github.com/afialapis/reactstrap-date-picker/commit/68da1afd1940ae073eeb5ce9dbe9778fef7c8b82