react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

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

Open puneet-ahuja opened this issue 1 year ago โ€ข 1 comments

Provide a general summary of the issue here

The default error message is increasing the width of the calendar on selection of invalid date range.

RangePicker Error Message

https://github.com/adobe/react-spectrum/assets/15903389/99529972-9a7b-4121-a656-1cae26b330bb

๐Ÿค” Expected Behavior?

The error message should wrap to avoid sudden increase in width on selection of invalid range.

๐Ÿ˜ฏ Current Behavior

The error message is increasing the width of the calendar on selection of invalid date range. Codesandbox link for reference.

๐Ÿ’ Possible Solution

We add some max-width to the container.

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

Open Codesandbox link

Version

3.33.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac OS

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

puneet-ahuja avatar Feb 13 '24 08:02 puneet-ahuja

Thanks for filing this, I think making the Dialog content container enforce its initial width/size itself to its content min width sounds like it work off the top of my head. Would you like to give it a shot?

LFDanLu avatar Feb 14 '24 19:02 LFDanLu