Bootstrap-datepicker: Popup calendar position is set releated to body, which cause issue in modal

Created on 21 Apr 2016  路  2Comments  路  Source: uxsolutions/bootstrap-datepicker

The calendar that pops up when click on the datepicker button is attached to the body. Also the position of the calendar box is set as absolute.

So, when you place the datepicker in a long model (where modal can be scrolled), the calendar box does not scroll (because the position is set to body, and when we scroll modal, the body remains fixed).

In my opinion, calendar should be fixed with its parent.

You can check the issue in this fiddle. Click to open modal, then click to open calendar, then scroll down the modal (without closing calendar).

https://jsfiddle.net/abdfahim/Lkzvkmok/

Most helpful comment

Does the option container fix your problem? See example: https://jsfiddle.net/Lkzvkmok/1/

All 2 comments

Does the option container fix your problem? See example: https://jsfiddle.net/Lkzvkmok/1/

Perfect. thanks.

Was this page helpful?
0 / 5 - 0 ratings