title: jQuery UI datepicker works on IE and Google Chrome, but not on Firefox
body: <p>This is my Layout page in ASP.NET MVC 5 project :</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;@ViewBag.Title - Fabricator&lt;/title&gt;
  
      @Styles.Render("~/Content/jqueryui")
      @Styles.Render("~/Content/css")
  
      @Scripts.Render("~/bundles/jquery")
      @Scripts.Render("~/bundles/jqueryui")
      @Scripts.Render("~/bundles/modernizr")
      @Scripts.Render("~/bundles/bootstrap")
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="container body-content"&gt;
  
          @RenderBody()
      &lt;/div&gt;
  
  
  
  
      &lt;script type="text/javascript"&gt;
          $(function () {
              // This will make every element with the class "date-picker" into a DatePicker element
              $('.date-picker').datepicker({ dateFormat: "mm-dd-yy" });
          })
      &lt;/script&gt;
  
      @RenderSection("scripts", required: false)
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>I call datepicker like this : </p>
  
  <pre><code>&lt;div class="form-group"&gt;
  
      &lt;label class="control-label col-md-2" for="ProjectDeadline"&gt;Project Deadline : &lt;/label&gt;
      &lt;div class="col-md-10"&gt;
          @Html.TextBoxFor(model =&gt; model.ProjectDeadline, new { @class = "date-picker"})
          @Html.ValidationMessageFor(model =&gt; model.ProjectDeadline)
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have this in the model : </p>
  
  <pre><code>[DataType(DataType.Date)]
  [DisplayFormat(DataFormatString =
     "{0:MM-dd-yyyy}",
      ApplyFormatInEditMode = true)]
  public DateTime ProjectDeadline { get; set; }
  </code></pre>
  
  <p>This code works perfectly on IE and Chrome, but when I click Create, it says </p>
  
  <blockquote>
    <p>The field ProjectDeadline must be a date.</p>
  </blockquote>
  
  <p>Can you tell me how to fix this? Thanks.</p>