-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] When using DatePicker and LuxonAdapter, changing prop adapterLocale does not influence the keyboard mask. #6540
Comments
Your issue is confusing because the "current behavior" is about the mask, and the "expected behavior" is about placeholder About the mask warning, it is here to point the format used (default luxon one) contains a section with variable length. Those elements are not supported by the mask, so the mask behavior is disabled (as explained by the warning) This problem will be fixed by fields components available in v6 About the placeholder, I confirm, it does not take into account the locale Here is a demo with en/fr locales. The placeholder are the same, but the values are month/day/year and day.month/year |
@alexfauquette I have checked your example, and it seems that masking does not work with 'de' locale (it contains dots).
Right, I have mixed that two, I meant placeholder. I will fix that. |
Not necessary to open an issue. It works because the french format is For example, the 1st of October will be:
The mask does not support this day format. If you used |
Indeed I have tested this on Edge using Hungarian locale - "hy" and as you say the masking works. |
Duplicates
Latest version
Current behavior 😯
When DatePicker is used together with LuxonThere there is a problem with using adapterLocale to influence the placeholder. It does not work. Additionally warning is shown:
Mask does not support numbers with variable length such as 'M'. Either use numbers with fix length or disable mask feature with 'disableMaskedInput' prop Falling down to uncontrolled no-mask input.
Context - #4755 (comment)
Expected behavior 🤔
Placeholder text should react to changing locale. Additionally no warnings in console would be nice.
Steps to reproduce 🕹
https://codesandbox.io/s/date-and-time-pickers-forked-fdfsxx?file=/src/App.tsx
Sorry for formatting, I created an issue from existing comment and there was template, my bad.
The text was updated successfully, but these errors were encountered: