You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: various S2 bug fixes from docs testing (#9272)
* remove allowsEmptycollection from our pickers since we dont support that behavior
* fix focusing DateFields on mobile tap
* fix SelectBoxGroup overflow when horizontal and only show checkbox in multiple selection
* fix taggroup remove button
* update link button to support genai and premium variants
* clear the context at the collapse collection level instead
* review comments
* chromatic fix
* make sure unavaliable dates are never marked as selected
* fix test case
* get rid of act
Copy file name to clipboardExpand all lines: packages/@react-aria/calendar/src/useCalendarCell.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,11 @@ export function useCalendarCell(props: AriaCalendarCellProps, state: CalendarSta
101
101
);
102
102
103
103
if(isInvalid){
104
-
isSelected=true;
104
+
// don't mark unavaliable + invalid dates in range calendars as selected, that case only comes up via allowsNoncontiguousRanges
105
+
// and thus those unavailable dates shouldn't be selected. For single select calendars, we mark unavailble + invalid days as selected for styling reasons
106
+
if(!('highlightedRange'instate)||!isUnavailable){
107
+
isSelected=true;
108
+
}
105
109
}
106
110
107
111
// For performance, reuse the same date object as before if the new date prop is the same.
0 commit comments