bleenco / ng2-datepicker

Angular2 Datepicker Component
http://ng2-datepicker.jankuri.com
MIT License
311 stars 236 forks source link

How can I listen onChange Event? #218

Open ptesar-xyndata opened 7 years ago

ptesar-xyndata commented 7 years ago

Hi have tried (change) and (onChange), but nothing works :(

jkuri commented 7 years ago

try (ngModelChange)

-- Jan Kuri

On 15 April 2017 at 23:52:02, xyndata s.r.o. (notifications@github.com) wrote:

Hi have tried (change) and (onChange), but nothing works :(

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jkuri/ng2-datepicker/issues/218, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtntnseN1qhDgkS14vjFfvlz7Lh0nS5ks5rwTwCgaJpZM4M-eG0 .

ptesar-xyndata commented 7 years ago

It's not called. (input) is called only when I change the text value. I've binded registerOnChange, but I receive only jQuery function and do not know how to call back my angular2 function.... :(

crownofapollo commented 7 years ago

Looking at the code, the component emits an event called outputEvents of type{ type: string, data: string | DateModel }. Look for type == "dateChanged".