angular-moment-picker icon indicating copy to clipboard operation
angular-moment-picker copied to clipboard

Outside updates are not reflected if directive is on input

Open vkrizan opened this issue 8 years ago • 0 comments

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"
       ...

vkrizan avatar Aug 29 '17 17:08 vkrizan