Nicola Peluchetti Nicola Peluchetti - 1 year ago 86
jQuery Question

is there a jquery dropdown year selector

is there a jQuery plugin that creates automatically a dropdown year selector (that is a "select" element poulated with all years starting from current and dating back to a given year)?

I don't need day/month (otherwise i'd have used the datepicker), i just need the year!

Thanks in advance

Answer Source

What about just:

<select name="yearpicker" id="yearpicker"></select>

And then:

for (i = new Date().getFullYear(); i > 1900; i--)
    $('#yearpicker').append($('<option />').val(i).html(i));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download