-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] DateCalendar
week day label are not understandable with the hebrew locale
#10790
Comments
Hi, Thanks for your contribution Maybe for your locale if make sense to just have the 7 labels hardcoded: https://codesandbox.io/s/date-picker-material-ui-forked-gr58rp?file=/src/App.js You can find the doc here Just so that you know, if the next major we will remove the |
DateCalendar
week day label are not understandable with the hebrew locale
A small clarification: to achieve the same behavior you'd need to make a minor adjustment to the suggested code: - const formattedDay = format(date, "EEE", { locale: he });
+ const formattedDay = format(date, "EEEEE", { locale: he });
- return formattedDay;
+ return formattedDay.charAt(0); In regards to the problem itself, I think that it is worth flagging it as a regression that should be addressed IMHO. 🤔
And now we changed to weekdayShort , which is probably always different from the manually used format previously.
Maybe for most common locales, this is not a problem, but it's clearly a breaking change in some cases. 🤔 WDYT about keeping the previous behavior for generating the array of
cc @michelengelen @flaviendelangle |
I'm not sure to understand your entire reasoning @LukasTy , sorry if I misunderstood some of it. For me we have two slightly related topics here:
That's because before it was hardcoded inside Is there something preventing us from changing the For me this point is not related to the fact of using
I'm not a fan of asking users to override our adapters methods to get the behavior they want. Concerning the |
Yes, that is indeed doable, just with a bit of inconsistency...
IMHO, it's slightly related, because the mentioned method avoided the inconsistency by avoiding the usage of singular defined format. 🤷
Do I understand it correctly that after the recent change, we no longer support changing the start of the weekday on Luxon adapter by overriding the I mentioned the |
But if we just change the
Yes, it's an unexpected regression that we must adress somehow I guess.
|
I will create a PR to handle this. 👌
I've created an issue for that: #10805. 😉 |
Steps to reproduce
Link to live example: https://codesandbox.io/s/date-picker-material-ui-forked-5q52m6?file=/src/App.js
Current behavior
Expected behavior
it should be -
Not sure why it is like that. I could not for the life of me find a way to 'customize' the days of week either, so I ended going back version until worked ( "@mui/x-date-pickers": "^5.0.0-beta.1" )
Context
No response
Your environment
chrome.
Search keywords: Date Picker
The text was updated successfully, but these errors were encountered: