How to Resolve input year only <input date="year">
You can use this snippet.
PHP Version:
<select class="form-control" name="startyear">
<?php
for ($year = (int)date('Y'); 1900 <= $year; $year--): ?>
<option value="<?=$year;?>"><?=$year;?></option>
<?php endfor; ?>
</select>
JavaScript Version:
<select name="yearpicker" id="yearpicker"></select>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
let startYear = 1800;
let endYear = new Date().getFullYear();
for (i = endYear; i > startYear; i--)
{
$('#yearpicker').append($('<option />').val(i).html(i));
}
</script>