I am using the following code to display only the years:
$(\"#datepicker\").datepicker( {viewMode: \"years\", minViewMode: \"years\"});
but inp
$("#year").datepicker( { format: "yyyy", viewMode: "years", minViewMode: "years" }).on('changeDate', function(e){ $(this).datepicker('hide'); });