indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
527 stars 229 forks source link

Force picker to use new time zone #301

Open CJDennis opened 3 years ago

CJDennis commented 3 years ago

I've created a form control that allows the user to select the time zone on the fly. It works very nicely, automatically updating the display value in the picker control. However, after setting a different time zone on the value in the model, the picker reverts to using local time until a new time is selected via the control.

How can I force refresh the control or otherwise get this to work? If I could say onTimeZoneSelect() { picker.controller.setDate(model.date); }, that should work but I don't know how to to that.