Skip to content

Commit

Permalink
Merge pull request #985 from TheDartCode/issue984
Browse files Browse the repository at this point in the history
Fix issue in linkedCalendars, where if the maxDate is this month, the…
  • Loading branch information
dangrossman committed Feb 22, 2016
2 parents 6c27fee + 59bce24 commit faa8940
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@
this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
}
}

if (this.linkedCalendars && this.rightCalendar.month > this.maxDate.month()) {
this.rightCalendar.month = this.maxDate.clone().date(2);
this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');
}
},

updateCalendars: function() {
Expand Down

0 comments on commit faa8940

Please sign in to comment.