I am using the following code to display only the years:
$(\"#datepicker\").datepicker( {viewMode: \"years\", minViewMode: \"years\"});
but inp
For bootstrap datetimepicker, assign decade value as follow:
bootstrap datetimepicker
decade
$(".years").datetimepicker({ format: "yyyy", startView: 'decade', minView: 'decade', viewSelect: 'decade', autoclose: true, });