Skip to content

Commit

Permalink
bug angular-ui#2506 Datepicker displays wrong week numbers
Browse files Browse the repository at this point in the history
fix bug angular-ui#2506 Datepicker displays wrong week numbers.
also fixed some white space problems jshint was complaining about.
  • Loading branch information
guenter-wolf committed Jul 26, 2014
1 parent cbfa8b9 commit fd55b35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {}
}
};
Expand Down

0 comments on commit fd55b35

Please sign in to comment.