<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular input[week] 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, 0, 3)
};
}]);
</script>
<form name="benimFormum" ng-controller="ornekController as dateCtrl">
<label>2013 yılı arasında bir tarih seçin:
<input id="exampleInput" type="week" name="input" ng-model="ornek.value"
placeholder="YYYY-W##" min="2012-W32"
max="2013-W52" required />
</label>
<div role="alert">
<span class="hata" ng-show="benimFormum.input.$error.required">
Gerekli!</span>
<span class="hata" ng-show="benimFormum.input.$error.week">
Geçersiz tarih değeri!</span>
</div>
<tt>value = {{example.value | date: "yyyy-Www"}}</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>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.