Skip to content

wip: wrap default error message text in V3 DateRangePicker #8623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

yihuiliao
Copy link
Member

Closes #5860

✅ 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:

🧢 Your Project:

Copy link
Member Author

@yihuiliao yihuiliao left a comment

Choose a reason for hiding this comment

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

will run chromatic tmr

@rspbot
Copy link

rspbot commented Jul 24, 2025

@rspbot
Copy link

rspbot commented Jul 24, 2025

@yihuiliao
Copy link
Member Author

yihuiliao commented Jul 24, 2025

Hmm yeah so looks like max-width: fit-content won't work when there are multiple visible months. We used to set the width by doing a bunch of calculations which was fine until we added multiple months (see commit). Maybe we should differentiate when visibleMonths=1 vs > 1?

Either way, seems more complicated, will work on it when I have the time but not main priority

@yihuiliao yihuiliao changed the title fix: wrap default error message text in V3 DateRangePicker wip: wrap default error message text in V3 DateRangePicker Jul 24, 2025
@@ -141,7 +141,7 @@
}

.react-spectrum-Datepicker-dialog.react-spectrum-Datepicker-dialog {
width: auto;
max-width: fit-content;
Copy link
Member

Choose a reason for hiding this comment

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

instead, you could try

contain: inline-size;

on the :global(.spectrum-Calendar-helpText) No idea why it's global...

@yihuiliao
Copy link
Member Author

imma just close it for now but might work on it later

@yihuiliao yihuiliao closed this Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DateRangePicker | Wrap text of default error message in case of selection of invalid date.
3 participants