From 4cc7ed4b983a61e12f4bd6595d794847ed782af9 Mon Sep 17 00:00:00 2001 From: "shrinidhi.upadhyaya" Date: Mon, 29 Apr 2024 00:18:17 +0200 Subject: [PATCH 1/4] fix(range-calendar): hide only dates outside the month #2890 --- .changeset/nasty-pillows-travel.md | 5 +++++ packages/components/calendar/src/calendar-cell.tsx | 2 +- packages/core/theme/src/components/calendar.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/nasty-pillows-travel.md 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: {}, }, From 1b2137440d80b929e0014ce34f38d81e6955df3a Mon Sep 17 00:00:00 2001 From: "shrinidhi.upadhyaya" Date: Mon, 29 Apr 2024 00:40:58 +0200 Subject: [PATCH 2/4] fix(range-calendar): corrected spelling mistake in changeset description --- .changeset/nasty-pillows-travel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/nasty-pillows-travel.md b/.changeset/nasty-pillows-travel.md index 74690c77b4..182b3fba51 100644 --- a/.changeset/nasty-pillows-travel.md +++ b/.changeset/nasty-pillows-travel.md @@ -2,4 +2,4 @@ "@nextui-org/calendar": patch --- -Fixed hiding of Unvavailable dates in RangeCalendar (#2890) +Fixed hiding of Unavailable dates in RangeCalendar (#2890) From 29ef6e4e714a35703b754cb5f0002477a4ba6156 Mon Sep 17 00:00:00 2001 From: "shrinidhi.upadhyaya" Date: Mon, 29 Apr 2024 00:47:19 +0200 Subject: [PATCH 3/4] fix(range-calendar): corrected capitalization in changeset description --- .changeset/nasty-pillows-travel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/nasty-pillows-travel.md b/.changeset/nasty-pillows-travel.md index 182b3fba51..ec06fbb625 100644 --- a/.changeset/nasty-pillows-travel.md +++ b/.changeset/nasty-pillows-travel.md @@ -2,4 +2,4 @@ "@nextui-org/calendar": patch --- -Fixed hiding of Unavailable dates in RangeCalendar (#2890) +Fixed hiding of unavailable dates in RangeCalendar (#2890) From b8c823e7993e975714d3f3cff0e9799779a67e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=C9=A8=D5=BC=C9=A2=D3=84=D5=A1=D6=85=D5=BC=C9=A2?= Date: Mon, 29 Apr 2024 11:57:12 +0800 Subject: [PATCH 4/4] chore(changeset): patch @nextui-org/theme --- .changeset/nasty-pillows-travel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/nasty-pillows-travel.md b/.changeset/nasty-pillows-travel.md index ec06fbb625..b45d465f2f 100644 --- a/.changeset/nasty-pillows-travel.md +++ b/.changeset/nasty-pillows-travel.md @@ -1,5 +1,6 @@ --- "@nextui-org/calendar": patch +"@nextui-org/theme": patch --- Fixed hiding of unavailable dates in RangeCalendar (#2890)