Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outside updates are not reflected if directive is on input #210

Open
vkrizan opened this issue Aug 29, 2017 · 0 comments
Open

Outside updates are not reflected if directive is on input #210

vkrizan opened this issue Aug 29, 2017 · 0 comments

Comments

@vkrizan
Copy link

vkrizan commented Aug 29, 2017

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"
       ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant