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 42dd6e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
14 changes: 3 additions & 11 deletions packages/react/src/date-picker/reactDayPickerStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,31 +211,23 @@ 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,
},
},
}),

'.range': {
'.range:not([disabled])': {
backgroundColor: boxPalette.selectedMuted,
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 42dd6e4

Please sign in to comment.