From 1214555370bbf5cb9e86ca19d469b36a4166c70e Mon Sep 17 00:00:00 2001 From: Adam Pryka Date: Sat, 22 Nov 2014 14:28:23 +0100 Subject: [PATCH] Fixed bug. Keybord left and up do not work after clicking right/down. In case when startDate = +1 and date was not set. --- js/bootstrap-datepicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();