@react-aria/calendar 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ export function useCalendarCell(props: AriaCalendarCellProps, state: CalendarSta
172
172
  // again to trigger onPressStart. Cancel presses immediately when the pointer exits.
173
173
  shouldCancelOnPointerExit: 'anchorDate' in state && !!state.anchorDate,
174
174
  preventFocusOnPress: true,
175
- isDisabled: !isSelectable,
175
+ isDisabled: !isSelectable || state.isReadOnly,
176
176
  onPressStart(e) {
177
177
  if (state.isReadOnly) {
178
178
  state.setFocusedDate(date);
@@ -302,7 +302,7 @@ export function useCalendarCell(props: AriaCalendarCellProps, state: CalendarSta
302
302
  calendar: date.calendar.identifier
303
303
  });
304
304
 
305
- let formattedDate = useMemo(() => cellDateFormatter.format(nativeDate), [cellDateFormatter, nativeDate]);
305
+ let formattedDate = useMemo(() => cellDateFormatter.formatToParts(nativeDate).find(part => part.type === 'day').value, [cellDateFormatter, nativeDate]);
306
306
 
307
307
  return {
308
308
  cellProps: {