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

Scroll Issue while using flat-pickrin VDialog #294

Open
yagnikvamja opened this issue Aug 30, 2024 · 5 comments
Open

Scroll Issue while using flat-pickrin VDialog #294

yagnikvamja opened this issue Aug 30, 2024 · 5 comments

Comments

@yagnikvamja
Copy link

There is an issue with the flat-pickr component when used within a VDialog. If the dialog is opened without scrolling the page, the date picker functions correctly. However, if the page is scrolled before reopening the dialog, the position of the flat-pickr shifts, causing it to display incorrectly.

Tell about your platform

  • flatPickr version : 4.6.x
  • Vue.js version : ^3.4.38
  • Browser name and version : Chrome version 128.0.6613.85
  • This package version : ^11

Current behavior

Expected behavior

The date picker position should align correctly with the input field, regardless of the page scroll.

Minimal reproduction of the problem with instructions
A minimal reproduction of the issue is provided in the attached link: https://stackblitz.com/edit/vitejs-vite-9ukhzc?file=src%2FApp.vue,src%2Fcomponents%2FHelloWorld.vue,index.html,package.json&terminal=dev

@ankurk91
Copy link
Owner

ankurk91 commented Sep 4, 2024

i could not replicate it, can u send a screen recording?
Did you try to search for similar issues
https://github.com/flatpickr/flatpickr/issues

@yagnikvamja
Copy link
Author

yagnikvamja commented Sep 5, 2024

Hello @ankurk91,

To help you better understand and reproduce the issue, I’ve created a minimal example for reference. You can access it via the following link: StackBlitz Reproduction.

Additionally, here is a screen recording of the issue: Screen Recording.

I found a similar issue with Flatpickr as well: flatpickr/flatpickr#1160

@ankurk91
Copy link
Owner

ankurk91 commented Sep 5, 2024

I was able to see the issue in recording, and i can see someone has commented the solution.

Have you tried using static: true in options?

@ankurk91
Copy link
Owner

Closing due to no activity

@yagnikvamja
Copy link
Author

Hello @ankurk91,

Apologies for the delayed response.

I attempted to pass static: true in the config, but it didn't work as expected. Since my dialog size is small, clicking on the date picker causes a scrollbar to appear, which negatively impacts the user experience.

Could you please guide me on how to achieve a smooth and proper opening of the dialog?

Reproduction link: https://stackblitz.com/edit/vitejs-vite-d2p3io?file=package.json

Additionally, here is a recording for reference: Vimeo link.

Thank you!

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

2 participants