-
Notifications
You must be signed in to change notification settings - Fork 123
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
Language doesn't change when calling mdcDatetimePickerDefaultLocale.setDefaultLocale() #116
Language doesn't change when calling mdcDatetimePickerDefaultLocale.setDefaultLocale() #116
Comments
As a workaround we use this: https://github.com/lgalfaso/angular-dynamic-locale and $localeChangeSuccess. |
@hexadecy and how do you hook this up with I've debugged it now and came down to the source. The main truth you need to face is, that
If you now take a closer look at the code, you'll notice that So either I have to re-define your factory every time I change the language or this library returns a function instead of an object. |
@hexadecy can you please confirm if https://github.com/beenote/angular-material-datetimepicker is the successor of this repository? |
In the pull-request linked here, I've (based on the version If you want, I can also rewrite it again in a way that |
I can confirm that the work-around by https://github.com/lgalfaso/angular-dynamic-locale works and I guess it will remove all the default properties you once set in my new PR ... If that's true, it should be added as a warning when you take my implementation. |
Ok I'll check your PR. Yes I wanted to contribute to this repo, but our the version used by our organization is now more up to date. |
Or ... actually ... it's still open here ... 😄 |
|
In my current code I use
angular-translate
and tried to update the language ofng-material-datetimepicker
when I update the language there.This code updates the default locale in your factory when my language (managed by
angular-translate
) is updated.The code above works correct (take heed to that I manually injected the language here) whereby the following code still shows the old names for f.e. the week-day after updating the language:
It seems that the default value, I update in my
$translateChangeSuccess
event, is just used the first timemdc-datetime-picker
is used and doesn't pick up the new value as I change it.The text was updated successfully, but these errors were encountered: