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

Flatpickr doesn't scroll properly #223

Open
info-chientran opened this issue Jul 1, 2024 · 0 comments
Open

Flatpickr doesn't scroll properly #223

info-chientran opened this issue Jul 1, 2024 · 0 comments

Comments

@info-chientran
Copy link

I'm working on a project where I added flatpickr to a modal. Whenever I scroll the modal scrolls as well but flatpickr remains on the same area relative to the background. See the screenshots for an example of what I mean

image

image

My code:

<div>
     <Flatpickr
         ref={endDateRef}
         className="flatpickr-input min-w-96 cursor-pointer border border-neutral-4 px-3 py-2 focus:border-neutral-1 focus:outline-none"
         placeholder="dd/mm/yyyy"
         onChange={(date) =>
             setEndDate(() => (date[0] ? formatDate('yyyy-mm-ddThh:mm:ss', date[0]) : ''))
         }
         options={{
             dateFormat: 'd/m/Y',
             minDate: startDate ? formatDate('dd/mm/yyyy', startDate) : 'today'
         }}
     />
 </div>

flatpickr version used: 3.10.13

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