diff --git a/.changeset/nasty-pillows-travel.md b/.changeset/nasty-pillows-travel.md new file mode 100644 index 0000000000..74690c77b4 --- /dev/null +++ b/.changeset/nasty-pillows-travel.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/calendar": patch +--- + +Fixed hiding of Unvavailable dates in RangeCalendar (#2890) diff --git a/packages/components/calendar/src/calendar-cell.tsx b/packages/components/calendar/src/calendar-cell.tsx index 351fcb212c..7de61e6ce2 100644 --- a/packages/components/calendar/src/calendar-cell.tsx +++ b/packages/components/calendar/src/calendar-cell.tsx @@ -42,7 +42,7 @@ export function CalendarCell(originalProps: CalendarCellProps) { ref, ); - const isUnavailable = state.isCellUnavailable(props.date) && !isDisabled; + const isUnavailable = state.isCellUnavailable(props.date); const isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1})); const isFirstSelectedAfterDisabled = diff --git a/packages/core/theme/src/components/calendar.ts b/packages/core/theme/src/components/calendar.ts index 5ebf37514f..01af7127bf 100644 --- a/packages/core/theme/src/components/calendar.ts +++ b/packages/core/theme/src/components/calendar.ts @@ -106,7 +106,7 @@ const calendar = tv({ }, hideDisabledDates: { true: { - cellButton: "data-[disabled=true]:opacity-0", + cellButton: "data-[disabled=true]:data-[outside-month=true]:opacity-0", }, false: {}, },