<!DOCTYPE html>
<html ng-app="Demo" style="height:100%;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Angular Moment Picker</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="//rawgit.com/indrimuska/angular-moment-picker/master/dist/angular-moment-picker.css" rel="stylesheet">
</head>
<body ng-cloak style="padding:20px;"
ng-controller="DemoController as ctrl">
<div ng-repeat="format in ctrl.formats" class="form-group">
<label>Format: <code>{{format}}</code></label>
<input class="form-control"
placeholder="Select a date..."
moment-picker="ctrl[format].stringDate"
locale="en"
format="{{format}}"
ng-model="ctrl[format].momentDate"
ng-model-options="{ updateOn: 'blur' }">
</div>
<hr>
<p>
All format tokens are available at
<a href="https://momentjs.com/docs/#/displaying/format/">https://momentjs.com/docs/#/displaying/format/</a>
</p>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment-with-locales.js"></script>
<script src="//rawgit.com/indrimuska/angular-moment-picker/master/dist/angular-moment-picker.js"></script>
<script src="script.js"></script>
</body>
</html>
angular
.module('Demo', ['moment-picker'])
.controller('DemoController', ['$scope', function () {
var ctrl = this;
// some sample format to show
ctrl.formats = [
'HH:mm',
'MMM Do YY',
'MMMM Do YYYY, h:mm:ss a',
'YYYY [escaped] YYYY',
'LT',
'LTS'
];
}]);
# Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
### More info at:
https://github.com/indrimuska/angular-moment-picker