amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.01k forks source link

Positioning picker while using container option #992

Open TheRossman opened 7 years ago

TheRossman commented 7 years ago

Hi,

I have a situation where if we do NOT specify, the container option for pickadate, the calendar picker shows up next to the input tag it's associated with, as desired, but because some parent containers have overflow: hidden on them, the modal background of the picker doesn't take over the whole screen, and in Firefox/Edge it allows the user to scroll the page and show "un-modalized" content.

If I user the container option to re-parent the picker, this works 100%, except that the picker doesn't any longer get positioned near the input element it is associated with (it is just centred in the page/viewport).

Is there a way to re-parent the picker, but then custom position it within it's new parent (so that it would approximate the position where it would be rendered if it was not re-parented).

Thanks!

TheRossman commented 7 years ago

I was trying to leverage the onOpen method to do this, but I'm not sure which picker element I should be positioning?