5

Is there an option in Angular UI Bootstrap Datepicker to display multiple months? like numberOfMonths option in JQuery datepicker.

2
  • Do you have any update or what did you use? Commented Oct 21, 2014 at 21:49
  • 3
    I switched to JQuery calendar, here is the Plunker: plnkr.co/edit/s71WDURou0QlRzM8Kjkc?p=preview Commented Oct 22, 2014 at 6:37

1 Answer 1

1

Use 2 datepickers with different models:

Here is a plunker:

<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);
});
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.