diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index 93b473f068..15198d5d7e 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -260,8 +260,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst if ( scope.showWeeks ) { scope.weekNumbers = []; // use date at middle of the row (3) instead of 0 to avoid problems when first day is Sunday - var weekNumber = getISO8601WeekNumber( scope.rows[0][3].date ), - numWeeks = scope.rows.length; + var weekNumber = getISO8601WeekNumber(scope.rows[0][3].date); + var numWeeks = scope.rows.length; while( scope.weekNumbers.push(weekNumber++) < numWeeks ) {} } };