title: ASP.Net MVC jQuery UI DatePicker Date Format
body: <p>I'm at my wits end trying to force this jQuery datepicker control to understand specific date formats. What the hell is going on here?</p>
  
  <p>View</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.StartDate, "{0:dd/MM/yyyy}", new { @class = "datefield" })
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>$(function () {
      $(".datefield").datepicker({
          dateFormat: 'dd/MM/yyyy',
          showOn: "button"
      });
  });
  </code></pre>
  
  <p>On page load</p>
  
  <p><img src="https://i.stack.imgur.com/opUVt.png" alt="On page load"></p>
  
  <p>datepicker clicked, so far so good</p>
  
  <p><img src="https://i.stack.imgur.com/DcQkw.png" alt="datepicker clicked"></p>
  
  <p>date selected... what?</p>
  
  <p><img src="https://i.stack.imgur.com/0PZVH.png" alt="date selected"></p>