title: jQuery UI Date Format
body: <p>I have the following script with a UI Datepicker, but I need the date as a param in my URL.. I just can't seem to get the date formatted correctly in the URL.. The input box with the date are just fine but the date don't show up in my URL string..</p>
  
  <p>I need the dateText variable to be formatted as "yyyy-mm-dd"</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      jQuery(function() {
      jQuery('#datepick').datepicker({ dateFormat: "yy-mm-dd" })({
          onSelect: function (dateText, inst) {
          window.location.href="reports?date=" + dateText;
      }
      })
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you.. </p>