katemihalikova / ion-datetime-picker

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

problem about reloading the datetime picker #121

Open hix41 opened 6 years ago

hix41 commented 6 years ago

Hi, I am using a cordova-plugin-translate to change the datetime-picker language dynamically. And I change the context in app.js following the documentation of ion-datetime-picker.However,I need to refresh the view to reload the datetime-picker popup to reload the new context that changed by cordova-plugin-translate.Now, the problem is that, I don't know how to reload the popup. Please tell me what to do. THX!

hix41 commented 6 years ago

Or, is there any way to refresh the datetime picker popup everytime it shows?

katemihalikova commented 6 years ago

Hi, it should reload automatically everytime the popup is shown.

hix41 commented 6 years ago

It wolud not reload everytime the popup is shown. So I put the code (about translate) in its own controller instead of in app.js . And it solve my problem successfully. THX!