mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
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:
parent
6aacde2594
commit
c83ff382b9
6
.changeset/nasty-pillows-travel.md
Normal file
6
.changeset/nasty-pillows-travel.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@nextui-org/calendar": patch
|
||||
"@nextui-org/theme": patch
|
||||
---
|
||||
|
||||
Fixed hiding of unavailable dates in RangeCalendar (#2890)
|
||||
@ -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 =
|
||||
|
||||
@ -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: {},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user