Tutorial 9 – how to use input via a date type in AngularJS

Tutorial 9 – how to use input via a date type in AngularJS
This sample will help you know easy about using input via date type.



Input date example


 <html>  
   <head>  
     <title>Angular JS Model</title>  
     <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>  
     <script>  
       angular.module('MyForm', [])  
           .controller('myController', ['$scope', function($scope) {  
         $scope.valueCalendar = new Date();  
       }]);  
     </script>  
   </head>  
   <body ng-app="MyForm">  
           <br />  
           <input type="date" name="input" ng-model="valueCalendar" />  
   </body>  
 </html>  


No comments:

Post a Comment

Popular Posts