fix(range-calendar): hide only dates outside the month (#2906)

* fix(range-calendar): hide only dates outside the month #2890

* fix(range-calendar): corrected spelling mistake in changeset description

* fix(range-calendar): corrected capitalization in changeset description

* chore(changeset): patch @nextui-org/theme

---------

Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
This commit is contained in:
Shrinidhi Upadhyaya 2024-04-29 07:16:22 +02:00 committed by GitHub
parent 6aacde2594
commit c83ff382b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
"@nextui-org/calendar": patch
"@nextui-org/theme": patch
---
Fixed hiding of unavailable dates in RangeCalendar (#2890)

View File

@ -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 =

View File

@ -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: {},
},