hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.57k stars 658 forks source link

don't set rdrInRange on passive days when no other days in the month belong to selection #555

Open cmawhorter opened 2 years ago

cmawhorter commented 2 years ago

I'm trying to add rounding to only the start and end edge of the range, which works great: image

and if the range spans multiple months, i render a muted range selection: image

that works too -- unless the range is near the month edge. in that case i end up with orphan days: image

maybe rdrInRange (etc.) should not be added to the passive days if no other days in that month belong to that range?

my workaround is to hide passive days, but i much prefer showing them: image

Environment

Package Version: 1.4.0 React version: 16.14.0 Node version: 14.16.0 Browser: chrome