Skip to content

fix: Custom 454 Calendar month#10115

Merged
yihuiliao merged 1 commit into
mainfrom
fix-custom-calendar-header
May 27, 2026
Merged

fix: Custom 454 Calendar month#10115
yihuiliao merged 1 commit into
mainfrom
fix-custom-calendar-header

Conversation

@snowystinger
Copy link
Copy Markdown
Member

Closes

Looks like the new hooks forgot to include the old logic. useVisibleRangeDescription path called startDate.calendar.getFormattableMonth(startDate) first, which is how Custom454Calendar remaps its internal "month 1" back to the Gregorian month that should be displayed (February).

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Covered by Chromatic and now a unit test as well

🧢 Your Project:

@snowystinger snowystinger added release no testing Does not require manual testing during testing session labels May 27, 2026
@github-actions github-actions Bot added the RAC label May 27, 2026
@rspbot
Copy link
Copy Markdown

rspbot commented May 27, 2026

}

return formatter.format(startDate.toDate(state.timeZone));
// Custom calendars like the 4-5-4 fiscal calendar use getFormattableMonth to map
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See old path here

if (startDate.calendar.getFormattableMonth) {

Copy link
Copy Markdown
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for figuring out that bug!

@yihuiliao yihuiliao added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit 2c18eb6 May 27, 2026
33 of 34 checks passed
@yihuiliao yihuiliao deleted the fix-custom-calendar-header branch May 27, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no testing Does not require manual testing during testing session RAC release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants