Closed BryanKuiper closed 9 months ago
This is really an edge case and won't be fixed, also, this is on end application to make sure that the picker has enough space to open, if not, other props can help with it.
@Jasenkoo I have similar problem. By "other props" you probably meant https://vue3datepicker.com/props/positioning/#alt-position? It can solve the problem, but I didn't find any docs that describe how often (or on what events) the customPosition
function is called.
My idea is to use something like https://floating-ui.com/docs/vue to calculate top
/left
and then use alt-position
to apply the values.
But, as the values are not constant (scroll position, window size, hidden/visible other elements, etc.), I need some hook to force vue-datepicker
to re-call the customPosition
function. Can you point me to the right direction, please?
Edit: Found https://vue3datepicker.com/methods-and-events/methods/#onscroll method. Tried it and it re-calls the customPosition
function on call. Probably this should be enough. Thank you! :)
To Reproduce Steps to reproduce the behavior:
Expected behavior The menu should never go out of bounds at the top of the screen. The menu should go above the input if both are valid:
The getMenuPlacement method determines whether the menu should be placed above or below the input but goes past all the if statements and therefore defaults to MenuPlacement.top in this situation. Maybe it should default to MenuPlacement.bottom.
Screenshots
Desktop & mobile (please complete the following information):