flatpickr / flatpickr

lightweight, powerful javascript datetimepicker with no dependencies
https://flatpickr.js.org
MIT License
16.04k stars 1.45k forks source link

Direction of calendarpicker is not reversing if it is close to the bottom viewport, when static prop is true. #1847

Open vipulrawat opened 5 years ago

vipulrawat commented 5 years ago

https://codesandbox.io/s/rflatpickr-reverse-direction-g891w

Your Environment

I have been using react-flatpickr, but it is the same case with vanilla flatpickr. I am using airbnb.css and adding some small own styles like day selection color etc over the top by wrapping it in a custom div with my own styles. static=true is provided as the prop so that I can add my own style and input, but then the direction of the picker is not reversing when the input is near the bottom viewport. See the attached codesandbox

alin-asavei commented 3 years ago

I have the same issue. Looks like static: true always puts the picker bellow the field, no matter what the position option is set to - there are situations where the picker needs to be displayed above the field and stay fixed on scroll