title: dd-mm-yyyy format for datepicker of MVC is not working in Chrome
body: <p>In my MVC5 Razor code for entering Date of Birth I am using a datepicker as below</p>
  
  <pre><code>    @Html.EditorFor(model =&gt; model.date_of_birth, 
  new { htmlAttributes = new { @class = "m-wrap  datepicker" } })
  </code></pre>
  
  <p>Here for the <code>model.date_of_birth</code> an <code>EditorFor</code> is calling and making it as a <code>datepicker</code> with <code>@class = datepicker</code></p>
  
  <p>Then the datepicker is initiated at the script area with below code</p>
  
  <pre><code> $('.datepicker').datepicker({
              format: 'yyyy-mm-dd',
              autoclose: true
          })
  </code></pre>
  
  <p>Here the date format is <code>'yyyy-mm-dd'</code> and it is working fine, but the user want it to be in <code>dd-mm-yyyy</code> format. So I changed the format in script as <code>dd-mm-yyyy</code>
  In Internet Explorer it is working fine but in Chrome it is giving an error for some date </p>
  
  <pre><code>eg:  14-05-2015
  </code></pre>
  
  <blockquote>
    <p>The field Date of Birth* must be a date.</p>
  </blockquote>
  
  <p>the date <code>11-05-2015</code> is working fine in chrome also. So I guess Chrome is taking the date format in <code>mm-dd-yyyy</code>. </p>
  
  <p>The format <code>'dd-M-yyyy'</code> is also working correctly only error coming for <code>dd-mm-yyyy</code></p>
  
  <p>Any way to overcome this browser specific error?</p>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>$.validator.addMethod('date', function (value, element) {
      if (this.optional(element)) {
          return true;
      }
      var valid = true;
      try {
          $.datepicker.parseDate('dd/mm/yyyy', value);
      }
      catch (err) {
          valid = false;
      }
      return valid;
  });
  
  $(function () {
  
   $('.datepicker').datepicker({
              format: 'dd/mm/yyyy',
              autoclose: true
          })
  });
  </code></pre>