Skip to content

Commit c693e01

Browse files
committed
add: calendar multi month styling - exclude outside selected
1 parent 6c578a6 commit c693e01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-aria-components/stories/Calendar.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ export const CalendarMultiMonth = () => (
7272
</div>
7373
<div style={{display: 'flex', gap: 20}}>
7474
<CalendarGrid style={{flex: 1}}>
75-
{date => <CalendarCell date={date} style={({isSelected, isOutsideMonth}) => ({opacity: isOutsideMonth ? '0.5' : '', textAlign: 'center', cursor: 'default', background: isSelected ? 'blue' : ''})} />}
75+
{date => <CalendarCell date={date} style={({isSelected, isOutsideMonth}) => ({opacity: isOutsideMonth ? '0.5' : '', textAlign: 'center', cursor: 'default', background: isSelected && !isOutsideMonth ? 'blue' : ''})} />}
7676
</CalendarGrid>
7777
<CalendarGrid style={{flex: 1}} offset={{months: 1}}>
78-
{date => <CalendarCell date={date} style={({isSelected, isOutsideMonth}) => ({opacity: isOutsideMonth ? '0.5' : '', textAlign: 'center', cursor: 'default', background: isSelected ? 'blue' : ''})} />}
78+
{date => <CalendarCell date={date} style={({isSelected, isOutsideMonth}) => ({opacity: isOutsideMonth ? '0.5' : '', textAlign: 'center', cursor: 'default', background: isSelected && !isOutsideMonth ? 'blue' : ''})} />}
7979
</CalendarGrid>
8080
</div>
8181
</Calendar>

0 commit comments

Comments
 (0)