Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Angular 6 (change) event not working #174

Closed
troncomputers opened this issue Aug 22, 2018 · 3 comments
Closed

Angular 6 (change) event not working #174

troncomputers opened this issue Aug 22, 2018 · 3 comments

Comments

@troncomputers
Copy link

Hi!
I hoped that this datepicker would be better than the one for bootstrap but I have same problem.

<input [(ngModel)]="dateFrom" class="form-control" type="text" data-toggle="datepicker" (change)="DateFromChange($event)" />

The Angular (change) event is not firing :(

@webdo
Copy link

webdo commented Aug 22, 2018

Hi, I do not use Angular, but i was having the same problem when using the "change" event, i ended up using the "input" event instead, maybe you can try that?

@troncomputers
Copy link
Author

Nope ;(
(input) is also not firing. I've tried (blur) and event rises but the value is the previous one.
So... This have nothing to do with datepicker right?

@fengyuanchen
Copy link
Owner

Both the input and change event are triggered when date changed:
https://github.com/fengyuanchen/datepicker/blob/master/src/js/methods.js#L110

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants