title: using jquery ui datepicker and changing date format
body: <p>I can't change the date format.. about to tear my hair out. Searched the API and tried it all. Tried everything</p>
  
  <h1>HTML</h1>
  
  <pre><code>&lt;body&gt;
    &lt;p&gt;Date:
      &lt;input type="text" id="datepicker" /&gt;
    &lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <h1>jQuery</h1>
  
  <pre><code>$(function () {
    $(".selector").datepicker({
      dateFormat: 'dd-mm-yy'
    });
    $("#datepicker").datepicker({
      showOn: "button",
      buttonImage: "calendar_icon120121018-7997-10s714y-0_original.png",
      buttonImageOnly: true
    });
  });
  </code></pre>