react-flatpickr icon indicating copy to clipboard operation
react-flatpickr copied to clipboard

Flatpickr doesn't scroll properly

Open info-chientran opened this issue 7 months ago • 0 comments

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

info-chientran avatar Jul 01 '24 09:07 info-chientran