A simple directive to produce a formatted date range display.
Download angular-date-range.min.js or install with bower
$ bower install angular-date-range --save
Load angular-date-range.min.js
, then add the date-range
module to your application.
angular.module('yourApp', ['date-range']);
<body ng-app="dateRangeExample">
<div id="daterange-wrap" ng-controller="dateRangeCtrl">
<span date-range start-date="{{startDate}}" end-date="{{endDate}}"></span>
</div>
</body>
angular.module('dateRangeExample', ['date-range'])
.controller('dateRangeCtrl', ['$scope', function($scope){
$scope.startDate = 'August 1, 2014';
$scope.endDate = 'August 31, 2014';
}]);
August 1 - 31, 2014
The example app can be launched using a simple web server, however, is dependent on a CDN hosted instance of Angular. You'll need to localize Angular to run completely local.
Testing is done using Karma Test Runner.
$ grunt test
$ grunt build