-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
CupertinoDatePicker - Day of the week always in EN (locale issue) #141875
Comments
The problem is still in version 3.22.1 |
This issue is assigned to @MitchellGoodwin but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
Any news about this issue? |
This happens because currently, if weekday is set (via flutter/packages/flutter_localizations/lib/src/cupertino_localizations.dart Lines 116 to 119 in 5103d75
I'm in the process of figuring out why that is so. |
So the entire flutter/packages/flutter/lib/src/cupertino/localizations.dart Lines 346 to 354 in a99042e
but with other locales we will need some sort of mapping of the String day of the week to the numerical day of the week. Currently I'm thinking of making a new function, say EDIT: Alternatively assuming no locale has skipped a day (or has some other unique behavior) I could just calculate sequentially from the first UTC day. Then the full date would not be needed. |
When will this fix be released? In the changelogs of the latest stable version of flutter it is not mentioned. |
Thanks for reaching out @salvatoremiccio! Currently the fix is only on master, and it has not been tagged to any candidate branches. Typically, it will go to beta by the next release, then stable after that one. This doc on Flutter's release process has more information. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to reproduce
I have implemented a picker with CupertinoDatePicker to select a day within a reservation process. I need the day of the week to be displayed to help the users in the booking so I have enabled the following parameter:
The issue occurs when combining this showDayOfWeek: true and this mode:
In this case the day of the week always displays in EN. The application supports EN, ES, and CA. One might think it's because the localizations are not properly configured, but the months appear in the correct language according to the device's locale. However, the day of the week does not. Additionally, if the mode is changed to
the day of the week appears in the proper language. I am attaching screenshots.
Expected results
The day of the week should vary according to the locale, just like the language of the months changes
Actual results
The day of the week always appears in English
Code sample
I have this locale configuration in Material App of main.dart
Code sample
That's the implementation of CupertinoDatePickerWidget. The error occurs specifically in date mode.
Screenshots or Video
Screenshots / Video demonstration
![ca1](https://github.com/flutter/flutter/assets/1089537/838a2d73-4f66-4b88-a83d-dabca468cad7) ![es1](https://github.com/flutter/flutter/assets/1089537/0ee7c2d0-b641-429e-9fd8-3b9bddcc25f8) ![ok1](https://github.com/flutter/flutter/assets/1089537/cd1177a2-89ed-427c-a6b9-26a8cf99400a)Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: