diff --git a/app/scripts/datePickerUtils.js b/app/scripts/datePickerUtils.js index a1119fe..1ae7ebe 100644 --- a/app/scripts/datePickerUtils.js +++ b/app/scripts/datePickerUtils.js @@ -40,7 +40,7 @@ angular.module('datePicker').factory('datePickerUtils', function () { var weeks = []; while (weeks.length < 6) { - if (m.year() === startYear && m.month() > startMonth) { + if ((m.year()*100 + m.month()) > (startYear*100 + startMonth)) { break; } weeks.push(this.getDaysOfWeek(m)); @@ -228,4 +228,4 @@ angular.module('datePicker').factory('datePickerUtils', function () { return (angular.isArray(targetIDs) && targetIDs.indexOf(pickerID) > -1 || targetIDs === pickerID); } }; -}); \ No newline at end of file +});