How to catch the bootstrap datepicker change event?

后端 未结 4 723
野性不改
野性不改 2021-02-07 04:58

Now I am trying to do something after user change the date. But seems like my ng-change is ignored.

Here is my code sample:

 

        
4条回答
  •  逝去的感伤
    2021-02-07 05:16

    You could keep an eye on when the $scope changed.

    Something like this:

    $scope.startdate;
    
    $scope.$watch("startdate", function(newValue, oldValue) {
        console.log("I've changed : ", startdate);
    });
    

提交回复
热议问题