johnpolacek / date-range-picker-for-shadcn

DateRangePicker is a reusable component for shadcn using Radix UI and Tailwind CSS. Includes preset date ranges, text entry, calendar selection and date comparison
https://date-range-picker-for-shadcn-demo.vercel.app/
MIT License
700 stars 28 forks source link

Event propagation issue on mobile #15

Open estubmo opened 5 months ago

estubmo commented 5 months ago

There's an issue when you select presets on mobile through the dropdown. The click might propagate down to the date selector, leading to the preset not being selected. This is due to event propagation not being handled in the Radix Select primitives.

Here's a solution: https://github.com/shadcn-ui/ui/issues/486#issuecomment-1675134732