Skip to content

Commit

Permalink
If single date picker and click a date in the future month, make that…
Browse files Browse the repository at this point in the history
… month in view when reopening
  • Loading branch information
dangrossman committed Sep 30, 2015
1 parent 5073b2b commit 7435612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
if (this.endDate) {

//if both dates are visible already, do nothing
if (this.leftCalendar.month && this.rightCalendar.month &&
if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month &&
(this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
&&
(this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM'))
Expand Down

0 comments on commit 7435612

Please sign in to comment.