Closed SimonGodefroid closed 1 month ago
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.
I am putting in a PR to fix this.
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: https://github.com/nextui-org/nextui/pull/3694#issuecomment-2387218249.
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