Skip to content

Commit

Permalink
Fix issue in linkedCalendars, where if the maxDate is this month, the…
Browse files Browse the repository at this point in the history
… right calendar showed a month after the maxDate prop
  • Loading branch information
TheDartCode committed Feb 22, 2016
1 parent 7010187 commit 59bce24
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 @@ -547,6 +547,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 59bce24

Please sign in to comment.