Reputation: 962
I wish for the user to be able to select the year without having to click on the prev or next tab relating to months. How can I accomplish this. Here is my code so far:
if ( $('[type="date"]').prop('type') != 'date' ) {
$('[type="date"]').datepicker({
//Something here
});
}
Upvotes: 1
Views: 42
Reputation: 661
this is my configuration of datepiker I use font awesome icon so just igonore that. what you want is the changeyear param.
$('#elementID').datepicker({
showOn: 'both',
buttonText: "<i class='fa fa-calendar fa-lg blue'></i>",
changeMonth: true,
changeYear: true
});
Upvotes: 2