Skip to content

Commit

Permalink
Fix hover states for disabled days
Browse files Browse the repository at this point in the history
  • Loading branch information
stowball committed Jan 6, 2025
1 parent 9cc9186 commit 65c2146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
12 changes: 2 additions & 10 deletions packages/react/src/date-picker/reactDayPickerStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,14 @@ export const reactDayRangePickerStyles = (
...(from && startStyles),
...(to && endStyles),
},
// '.rdp-day_range_start ~ .rdp-day': {
// ...(from &&
// !to && {
// backgroundColor: 'red',
// }),
// },
// '[data-in-range]': {

...(inputMode && {
'.rdp-day': {
...(inputMode === 'from' && startStyles),
...(inputMode === 'to' && endStyles),
'&:hover': {
'&:hover:not([disabled])': {
backgroundColor: boxPalette.selected,
// border: '3px solid red',
color: boxPalette.backgroundBody,
},
},
}),
Expand All @@ -235,7 +228,6 @@ export const reactDayRangePickerStyles = (
borderRadius: 0,
color: boxPalette.foregroundText,
fontWeight: 'bold',
// fontSize: 30,
},
};
};
3 changes: 0 additions & 3 deletions packages/react/src/date-range-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,9 @@ export const DateRangePicker = ({
// return fromRange().has(day.toDateString());
// // return range().includes(day);
// },
// qux: range(),
// foo: hoveredDay,
},
modifiersClassNames: {
fromRange: 'range',
// foo: 'baz',
},
onHover,
clearHoveredDay,
Expand Down

0 comments on commit 65c2146

Please sign in to comment.