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

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

  
</head>
<body ng-app="ornekUygulama">
  <script>
  angular.module('ornekUygulama', [])
    .controller('ornekController', ['$scope', function($scope) {
      $scope.ornek = {
        value: new Date(2010, 11, 28, 14, 57)
      };
    }]);
</script>
<form name="benimFormum" ng-controller="ornekController as dateCtrl">
  <label for="exampleInput">2013 yılı arasında bir tarih seç:</label>
  <input type="datetime-local" id="ornekInput" name="input" ng-model="ornek.value"
      placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
  <div role="alert">
    <span class="hata" ng-show="benimFormum.input.$error.required">
        Gerekli!</span>
    <span class="hata" ng-show="benimFormum.input.$error.datetimelocal">
        Geçerli data değeri değil!</span>
  </div>
  <tt>value değeri = {{ornek.value | date: "yyyy-MM-ddTHH:mm:ss"}}</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.