AngularJS Tutorial - Bind date input








The following code shows how to bind date input value.

Example


<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--  ww  w. j  a v  a2 s .  c  o m-->
<body>
<div>
   <input type="date" data-ng-model="date" style="width:200px;" />
   <br>
   {{ date }}
</div>
</body>
</html>

The code above is rendered as follows: