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:
<input ng-change='changedate()'
type="text"
starting-day="2"
show-button-bar="false"
show-weeks="false"
class="form-control addTicketDateInput"
datepicker-popup="dd MMM"
ng-model="startdate"
is-open="openstart"
datepicker-options="dateOptions"
ng-required="true"
close-text="Close" />
In my controller:
$scope.changedate=function(){
console.log($scope.startdate);
}
Any idea?
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);
});