title: Add eventhandler to jQuery UI datepicker after its creation
body: <p>I have the following scenario:</p>
  <p>In my masterpage I have:</p>
  <pre><code>$(&quot;.datepicker&quot;).datepicker({
      changeYear: true,
      changeMonth: true,
      dateFormat: &quot;dd/mm/yy&quot;,
      duration: 'fast'
  });
  </code></pre>
  <p>With this, every input field that I assign the class &quot;datepicker&quot; to, shows the jQuery UI datepicker when clicked.</p>
  <p>Now I have a datepicker on a page that should have its <code>onSelect</code> event handled. What would be the way considered best practise to do this?</p>
  <p>Options I see:</p>
  <ul>
  <li>give that 1 datepicker another class, like <code>datepickerWithSelectEvent</code>. What I dont like about this solution is that I get duplicate code for initializing the <code>changeYear</code>, <code>changeMonth</code>, ... . If I want to change the datepickers in a project I'll have to remember changing this in 2 places</li>
  <li>Somehow add the eventhandler after the creation of the datepicker. This seems cleanest, but I don't really know how to do it. Anyone?</li>
  </ul>