Is there an option in Angular UI Bootstrap Datepicker to display multiple months? like numberOfMonths option in JQuery datepicker.
-
Do you have any update or what did you use?jayM– jayM2014-10-21 21:49:53 +00:00Commented Oct 21, 2014 at 21:49
-
3I switched to JQuery calendar, here is the Plunker: plnkr.co/edit/s71WDURou0QlRzM8Kjkc?p=previewdr.calix– dr.calix2014-10-22 06:37:22 +00:00Commented Oct 22, 2014 at 6:37
Add a comment
|
1 Answer
Use 2 datepickers with different models:
<body ng-controller="MainCtrl as main">
<div ng-form class="btn-group" dropdown>
<datepicker ng-model="main.startDate" max-date="main.endDate"></datepicker>
<datepicker ng-model="main.endDate" min-date="main.startDate"></datepicker>
</div>
<p>{{main.startDate | date:'EEEE MMMM d'}} - {{main.endDate | date:'EEEE MMMM d'}}</p>
var app = angular.module('plunker', ['ui.bootstrap']);
app.controller('MainCtrl', function($scope) {
this.startDate = new Date();
this.endDate = new Date(this.startDate.getTime() + 7 * 24 * 60 * 60 * 1000);
});