title: Why does changing the dateFormat of my jQuery datepicker fail?
body: <p>I know there are loads of questions on here about changing the datepicker dateFormat, but i'm following the instructions exactly and they seem to have no effect. Here is the exact code that was suggested on other answers:</p>
  
  <pre><code>$(document).ready(function() {
      $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' });
  });
  </code></pre>
  
  <p>Yet when I run it, and test the datepicker value with <code>alert($('#datepicker').datepicker("getDate"));</code></p>
  
  <p>I get the date back in the undesired format! This is extremely confusing. Am I something wrong? See the described behaviour at <a href="http://jsfiddle.net/TmdM8/" rel="nofollow">http://jsfiddle.net/TmdM8/</a></p>
  
  <p>edit: even more confusing is that if I read the dateformat using <code>alert($("#datepicker").datepicker('option', 'dateFormat'));</code></p>
  
  <p>... the returned dateFormat is correct, even though calling <code>getDate</code> does not return the date in the desired format. See <a href="http://jsfiddle.net/fWmBe/" rel="nofollow">http://jsfiddle.net/fWmBe/</a></p>