title: jquery ui datepicker getDate returns Object instead of Date
body: <p>I'm probably missing something simple here, but I'm having trouble with the jquery ui datepicker. It seems like it is just returning a generic Object instead of a Date object, which is not what I expected. Here is the code:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
  
    &lt;link type="text/css" href="jquery_ui/css/custom-theme/jquery-ui-1.8.14.custom.css" rel="stylesheet" /&gt;    
    &lt;script type="text/javascript" src="jquery_ui/js/jquery-1.6.2.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery_ui/js/jquery-ui-1.8.16.custom.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
  
      Date.prototype.addHours= function(h){
          this.setHours(this.getHours()+h);
          return this;
      }
  
      $(function() {
  
          $( "#startdatetime" ).datepicker( 
              {
                  onSelect: function(dateText, inst) {
                      sd = $( "startdatetime" ).datepicker( 'getDate' );
                      sd.addHours(10);
                  }
              }); 
  
      });
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body &gt;
      &lt;input id="startdatetime" type="text"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The exception I get is "sd.addHours is not a function", and using firebug it looks like getDate is giving me the wrong object (not a Date).</p>
  
  <p>I'm not very familiar with javascript or jquery, does anyone know why this is happening?</p>