$('.year1').datepicker({ startView: 'decade', minView: 'decade', format: 'yyyy', maxViewMode: 2, minViewMode:2, autoclose: true });