<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Angular input[month] Direktifleri</title>
  

  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
  

  
</head>
<body ng-app="ornekModul">
  <script>
 angular.module('ornekModul', [])
   .controller('ornekController', ['$scope', function($scope) {
     $scope.ornek = {
       value: new Date(2013, 9, 1)
     };
   }]);
</script>
<form name="benimFormum" ng-controller="ornekController as dateCtrl">
  <label for="ornekInput">2013 yılına ait bir ay seçin:</label>
  <input id="ornekInput" type="month" name="input" ng-model="ornek.value"
     placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
  <div role="alert">
    <span class="hata" ng-show="benimFormum.input.$error.required">
       Gerekli!</span>
    <span class="hata" ng-show="benimFormum.input.$error.month">
       Geçersiz ay değeri!</span>
  </div>
  <tt>value = {{ornek.value | date: "yyyy-MM"}}</tt><br/>
  <tt>benimFormum.input.$valid = {{benimFormum.input.$valid}}</tt><br/>
  <tt>benimFormum.input.$error = {{benimFormum.input.$error}}</tt><br/>
  <tt>benimFormum.$valid = {{benimFormum.$valid}}</tt><br/>
  <tt>benimFormum.$error.required = {{!!benimFormum.$error.required}}</tt><br/>
</form>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.