title: jquery datepicker onselect year
body: <p>I am selecting only year from drop down. Here is my code:  </p>
  
  <pre><code>$('#year1').datepicker( {
      changeMonth: false,
      changeYear: true,
      showButtonPanel: false,
      dateFormat: 'yy',
      yearRange: "-2:+0",
      onClose: function(dateText, inst) { 
          var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
          $(this).datepicker('setDate', new Date(year, 1, 1));
      }
  });
  </code></pre>
  
  <p>Now I want to close the panel when I select year from drop down. But it does not close on selecting year. But when I click anywhere else it gets closed. I tried <code>onSelect</code> insted of <code>onClose</code> event but this event does not fire on selecting year. I think this event fires on selecting date. Can anyone help me close it when I select only year from down down.
  Thanks.</p>