Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from MatissJanis/master
Browse files Browse the repository at this point in the history
Fix year placeholder
  • Loading branch information
jfmdev authored Jul 21, 2016
2 parents 51426a9 + 0b6bd01 commit 26a77ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/ngComboDatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ angular.module("ngComboDatePicker", [])

// Initialize list of years.
$scope.years = [];
if(placeHolders) $scope.years.push(placeHolders[0]);
for(var i=$scope.minDate.getFullYear(); i<=$scope.maxDate.getFullYear(); i++) {
$scope.years.push({value:i, name:i});
}
Expand All @@ -135,6 +134,9 @@ angular.module("ngComboDatePicker", [])
$scope.years.reverse();
}

// Prepend the years placeholder
if(placeHolders) $scope.years.unshift(placeHolders[0]);

// Initialize list of months names.
var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
if($scope.ngMonths !== undefined && $scope.ngMonths !== null) {
Expand Down

0 comments on commit 26a77ff

Please sign in to comment.