Commit 1c3ced5
fix: simplify date range picker to Airbnb-style selection (calcom#25386)
* feat: simplify date range picker to Airbnb-style selection
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* feat: apply Airbnb-style selection to allowPastDates branch
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: extract date range selection logic and add unit tests
- Extract date range selection logic into pure function (dateRangeLogic.ts)
- Remove unused allowPastDates parameter from selection logic
- Add comprehensive unit tests (11 test cases covering all scenarios)
- Simplify DateRangePicker component (30+ lines -> 5 lines)
- Improve separation of concerns: allowPastDates only controls calendar date restrictions
* style update
* feat: add hover highlighting for date range selection
When a start date is selected and user hovers over other dates,
the potential range between start and hovered date now shows
bg-emphasis background for better visual feedback.
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* memoize hovering range and update styles
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 88ce786 commit 1c3ced5
5 files changed
Lines changed: 337 additions & 253 deletions
File tree
- apps/web/playwright
- packages/ui/components/form/date-range-picker
0 commit comments