katemihalikova / ion-datetime-picker

Date and/or time picker for awesome Ionic framework
MIT License
169 stars 101 forks source link

Dynamically changing the localization #63

Closed leostaric closed 7 years ago

leostaric commented 7 years ago

Hi, I am out of options on where to ask, and fairly new to Ionic. When I use app.run() to set the localization data in my app.js, it works. However, when I try the same thing in my controller, it never gets executed. How am I supposed to change the localization if my user changes his prefered language while using the application?

katemihalikova commented 7 years ago

Hi, the localization factory works fine for me, although it's limited - it does not change locale data of already opened picker, but this should be no issue. When locale data are changed and new picker is opened, it should use the new data. See codepen to see it working in action.