i tired to bind year dropdown like this
<div class="col-sm-7"> <select id="dropdown"> <option value="">-Select-</option> </select> </div>
let dateDropdown = document.getElementById('dropdown');
let currentYear = new Date().getFullYear(); let earliestYear = 1970;
while (currentYear >= earliestYear) { let dateOption = document.createElement('option'); dateOption.text = currentYear; dateOption.value = currentYear; dateDropdown.add(dateOption); currentYear -= 1; }
and its shows dropdown of year,
but my problem is how can i bind or fetch in backend code
revivalForm.Year = ??