1
votes

I have an angular uib datepicker that works fine when selecting dates, but now I need something else from it. I would like to be able to call a function when the user navigates through the month/year menu.

Until now, the datepicker only reacts when a day is selected (the ng-model changes, ng-change is called etc etc). I want to call a function when the user uses the top menu and he/she didn't click on a day yet. Just going from one month to another, either with the arrows or with the month/year selector, I would need to call a function.

Is there any way to do it? I can't figure it out.

Appreciate it.

enter image description here enter image description here

1

1 Answers

0
votes

We finally figured it out.

Using a decorator (that we learned from here Angular Bootstrap Datepicker change month event) you can throw a function when the month or the year is changed in a datepicker.