title: jQuery ui Datepicker - global extend/override?
body: <p>I have a page using dozens of jQuery-UI's datepicker instances. Now I need to add additional functionality to the <em>beforeShowDay</em> function.</p>
  
  <p>I thought, extending it would be the right way, until I found out it does not use the widget-factory, which makes extending quite hard in my case.</p>
  
  <p>Is there any way to extend the logic..</p>
  
  <ul>
  <li><p>without touching each instantiation of the datepicker</p></li>
  <li><p>without touching the jquery-ui.js itself</p></li>
  </ul>
  
  <p><strong>Here's what I've tried so far:</strong></p>
  
  <pre><code>$(document).ready(function() {
      $.extend($.ui.datepicker.prototype, {
          beforeShowDay: function(d) {
              console.log(d);
          }
      });
  });
  </code></pre>
  
  <p>That does not result in js-errors, even though it does not log anything in console on opening a datepicker the common way.</p>