-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker uses wrong month names from localization file #5440
Comments
We are relying on the date filter to do that kind of stuff. |
@Foxandxss, so is there anything for us to do here? |
Not sure but I don't think so. |
The date filter is for formatting date strings right? For the text field I understand that's the date filter's responsibility and that probably already works correctly. However this is about the picker popup. In there it can show a list of months and those names should be different. You can get those from $locale.DATETIME_FORMATS.STANDALONEMONTH, every locale file has it. You only need to change the key from MONTH to STANDALONEMONTH really, or am I thinking too simple? |
This would need to be changed in the dateparser - this sounds like a legitimate change. Feel free to open a PR with the fix. |
I took a look at the source code of the datepicker. I agree now that the date filter may be the real place to be to address this issue. I'll look into it some more when I have the change. |
I've been told that the date filter in Angular 1.5.1 will support the alternative month names by using 'LLLL'. This means that in the datepicker the constant formatMonth should be changed to 'LLLL' and formatMonthTitle to 'LLLL yyyy'. I don't know if it's hard to build in some kind of fallback in case LLLL isn't available, probably not. |
When it lands in the date filter, a modification will be needed to added to support the |
@wesleycho: Same issue. Looks like
|
I'm localizing an application to Polish, and it turns out that languages from that region have two different versions of each month's name.
More info here:
angular/angular.js#10247
Now the datepicker seems to be using the wrong ones. In Angular's localization files both versions are present. Basically the datepicker should use STANDALONEMONTH for in the popup (lists, dropdowns etc.). The other version should be used when formatting date strings, above link provides a regex to determine when to use what.
So is it possible to make the datepicker use the right month names (or maybe I'm just overlooking something)?
The text was updated successfully, but these errors were encountered: