I think you there is something wrong with the NgModelController.
you use the following function to response the datepicker callback, and update the $scope.model inside this function. But anyway, you didn't change the $modelValue, or $viewValue, so that won't emit the dirty check and won't run the ng-change function.
I think you there is something wrong with the
NgModelController
.you use the following function to response the datepicker callback, and update the
$scope.model
inside this function. But anyway, you didn't change the$modelValue
, or$viewValue
, so that won't emit the dirty check and won't run the ng-change function.So I add this to trigger it.
modelCtrl.$modelValue = $scope.model
modelCtrl.$validate()
Also this is not a better way to do that. Hope to update this in the future.