angular-bootstrap-daterange-picker
v1.0.2
Published
another Angular.js wrapper for bootstrap-daterangepicker
Downloads
342
Readme
angular-bootstrap-daterange-picker
Sorry for my english,the code mainly from angular-daterangepicker,I found it can't work with ngModelController.$dirty and I can't commit PR using coffeescript,so I write this.
Installation
via npm
npm install angular-bootstrap-daterange-picker --save
via bower
bower install angular-bootstrap-daterange-picker --save
Getting Started
Declare dependency:
angular.module('demo', ['dateRangePicker']);
Prepare model in your controller. The model must have startDate
and endDate
attributes:
class DemoCtrl {
constructor() {
this.selectedDate = {
startDate: null,
endDate: null
};
}
}
html template
<div ng-controller="DemoCtrl as vm">
<input date-range-picker type="text"
class="form-control date-picker"
ng-model="vm.selectedDate"/>
</div>
License
MIT