angular-moment-picker
angular-moment-picker copied to clipboard
Outside updates are not reflected if directive is on input
If the directive is on input and ngModel === momentPicker the input does not get updated when model changes are done outside of the directive.
Reproducer:
<input class="form-control"
moment-picker="ctrl.stringDate"
format="YYYY-MM-DD"
ng-model="ctrl.stringDate"
ng-model-options="{ updateOn: 'blur' }">
<a href="#" ng-click="ctrl.stringDate = '2017-01-01'">Update</a>
I don't know if this could be easily fixed. However, I'd suggest to use moment-picker without value in this case, but that does not work too.
<input class="form-control"
moment-picker
ng-model="ctrl.stringDate"
...