diff --git a/js/bootstrap-datepicker.js b/js/bootstrap-datepicker.js index 6fbbeb3d2..931e3a92c 100644 --- a/js/bootstrap-datepicker.js +++ b/js/bootstrap-datepicker.js @@ -1151,7 +1151,7 @@ newViewDate = new Date(focusDate); newViewDate.setUTCDate(focusDate.getUTCDate() + dir); } - if (this.dateWithinRange(newDate)){ + if (this.dateWithinRange(newViewDate)){ this.focusDate = this.viewDate = newViewDate; this.setValue(); this.fill(); @@ -1179,7 +1179,7 @@ newViewDate = new Date(focusDate); newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7); } - if (this.dateWithinRange(newDate)){ + if (this.dateWithinRange(newViewDate)){ this.focusDate = this.viewDate = newViewDate; this.setValue(); this.fill();