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
546 stars 20 forks source link

Event propagation issue on mobile #15

Open estubmo opened 1 month ago

estubmo commented 1 month 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