I can not figure out how to call the function, yea()
.
Here is my code, currently:
<script>
$(document).ready(function() {
var myDate = new Date();
function yea(){
var year = myDate.getFullYear();
for(var i = 1950; i < year+1; i++){
return '<option value="'+i+'">'+i+'</option>';
}
}
$(wrapper).append(
<div class="form-group">
<select name="from_year[]" class ="form-control"> '+yea()+' </select>
</div>
);
}
</script>