fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 372 forks source link

Clear button is not firing the proper event #189

Closed leonidumanskiy closed 5 years ago

leonidumanskiy commented 8 years ago

When using clearable="true" and "apply.daterangepicker" and "cancel.daterangepicker" events, clicking on "clear" button will not fire any of these events. However, if there was nothing selected, clicking on the "clear" button will fire "cancel.daterangepicker" event (which seems logical).

Shouldn't clicking on "clear" change the model and always fire the "apply" event? I am trying to simply follow the change of the date and make an ajax call after the model has changed. Is there any simple way to make it work with the "clearable=true"? Right now I use $watch to track the change of the model, which seems fine, but still...