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
...
// from the docsconstmin=today(getLocalTimeZone());
...
<DateRangePickerlabel="Start date - End date"minValue={min}/>
Expected behavior
The error message should respect the provided's locale format.
ATM I receive Value must be 8/29/2024 or later. I expect instead Value must be 29/08/2024 or later.
Screenshots or Videos
Operating System Version
macOs
Browser
Chrome
The text was updated successfully, but these errors were encountered:
Seems like validation messages which includes the date needs to be modified by the next-ui.
The validation messages obtained from the react-aria are created by the browser, hence the custom locale would not work here. The date in error message will contain the locale of the browser.
I am not sure if there is any hack for this to get the validation message according to the custom locale.
Thanks for the issue. If you'd like to set the validation message using a locale other than the browser's, please handle it using the errorMessage prop. You can refer to the following for more details: #3694 (comment).
NextUI Version
2.4.2
Describe the bug
Set the locale in the
NextUIProvider
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Set the locale in the
NextUIProvider
Consume the
DateRangePicker
componentExpected behavior
The error message should respect the provided's locale format.
ATM I receive
Value must be 8/29/2024 or later.
I expect insteadValue must be 29/08/2024 or later.
Screenshots or Videos
Operating System Version
macOs
Browser
Chrome
The text was updated successfully, but these errors were encountered: