wakirin / Litepicker

Date range picker - lightweight, no dependencies
MIT License
898 stars 132 forks source link

Position relative to parentEl #317

Open bjornandrip opened 1 year ago

bjornandrip commented 1 year ago

Describe the bug I have a div positioned far down on a page that has a datepicker. This datepicker shows a litepicker instance when pressed which positions itself relative to the parentEl but calculates it top attribute relative to the body.

To Reproduce Steps to reproduce the behavior:

  1. Create a div which has margin-top: 500px for example and position: relative
  2. Initialise a Litepicker inside the child div with it set as its parentEl.

Expected behavior The litepicker is positioned relative to the parentEl in step 1 and gets the correct top positioning relative to its parent.

jsfiddle.net / codepen.io / etc Please provide a link with bug.

Additional context