title: JQuery mobile UI Date picker format
body: <p>I am using this JQuery plugin <a href="http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/" rel="nofollow">http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/</a> to have a calender on my app but the only problem is it is formatted as mm/dd/yyyy. I have done some research into how to change this but not had much luck so far.</p>
  
  <p>I would like to have it formatted as dd/mm/yyyy instead. I have tried adding a few JavaScript functions to change it but so far not had any luck. </p>
  
  <p>This is the HTML code for my calender:</p>
  
  <pre><code>  &lt;form action="#" method="get"&gt;
       &lt;div data-role="fieldcontain"&gt;
        &lt;label for="date"&gt;Date Input:&lt;/label&gt;
       &lt;br&gt;
        &lt;input type="date" name="date" id="date" style="width: 50%;" /&gt;
       &lt;/div&gt;     
      &lt;/form&gt;
  </code></pre>
  
  <p>This is the JavaScript I have been trying to get the format to change but I haven't had much luck:</p>
  
  <pre><code>var date = $('#date').datepicker({ dateFormat: 'dd-mm-yy' }).val();
  </code></pre>
  
  <p>So far this just changes the placeholder in the input bbox to dd/mm/yyyy and when a new date is selected on the calendar it doesnt change.</p>
  
  <p>I would appreciate any help with this.</p>