AngularJS Simple Example
HTML
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css">
<div ng-app ng-controller="LoginController">
<input type="date" id="test" ng-model="date" ng-change="changeDetected()"/>
{{date}}
</div>
JavaScript
function LoginController($scope) {
$scope.changeDetected = function() {
console.log($scope.date);
}
if ($('#test')[0].type != 'date') $('#test')
.datepicker({
onSelect: function(date) {
$scope.date = date;
$scope.$apply();
$scope.changeDetected(date);
}
});
}