I'm using react-dates from Airbnb and part of the component of the calendar such as navigation button and help button (green question mark) is overlapping even when the react-modal is presented. Everything else works fine.
Does anyone have an idea why this is happening?

There may be a better solution by the package author, but you could set the z-index style on the overlay. You can put something in your CSS like:
.ReactModal__Overlay {
z-index: 1000;
}
That worked for me. Let me know how it goes.
Hi @matthew-matvei , thank you so much for the solution. It was really silly of me for not thinking to modify the z-index. Definitely appreciate the quick fix to the problem.
Would also be curious to find out what was the root cause to the problem as I'm relatively new in React development. Thanks again!
No worries.
Apparently, React decides Z-index based on the component's order in the render tree. Given that it's likely you'll have other components down the line from where the modal is placed, I guess you'll probably have something overlapping by default (unless there's something else we've both neglected ;-) )
@darylong is this a fix for your issue? If so, you can close this.
@matthew-matvei Thank you!
@diasbruno no worries!
Yes the issue is now fixed thanks to @matthew-matvei. Will be closing now, thanks!
Most helpful comment
There may be a better solution by the package author, but you could set the
z-indexstyle on the overlay. You can put something in your CSS like:That worked for me. Let me know how it goes.