Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "_positionCalendar" public to handle page scroll #2968

Open
marc-mabe opened this issue Nov 29, 2023 · 0 comments
Open

Make "_positionCalendar" public to handle page scroll #2968

marc-mabe opened this issue Nov 29, 2023 · 0 comments

Comments

@marc-mabe
Copy link

Hello,

The calendar does not handle page scrolling in many cases as it's rendered as an overlay on the body element using the current element position. This does not get updated of the page gets scrolled or any of the parent elements get scrolled.
In the project I'm working on I found a workaround to actually reposition the calendar on scroll event but this _positionCalendar method is not documented nor public (indicated by _ prefix).

As it's useful to manage calendar position on scroll I would suggest to make it public.

This is what I have currently:

    private updatePosition() {
        /* eslint-disable no-underscore-dangle */
        this.flatpickerStart?._positionCalendar();
        this.flatpickerEnd?._positionCalendar();
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant