I want to create a year selection dropdown. year must start from this year upto next 7 years .
I have tried
var year = new Date().getFullYear();
var range = [];
range.push(year);
for (var i = 1; i < 7; i++) {
range.push(year + i);
}
$scope.years = range;
<select class="form-control" ng-options="year for year in years" name="expiryMonth" ng-model="expiryMonth" required>'
But this creates a html ,
<option label="2016" value="number:2016">2016</option>
this creates a required year dropdown But i want Value to be last two digits of label
Also, my first option should be like
<option value="">select month</option>