title: MVC date format and datepicker
body: <p>I just implemented the datepicker provided by jQuery UI in order to use the calendar to choose the a date. Unfortunately, when I choose the date and want click on the create button, the application doesn't want to save my entries because the date format is invalid. I tried to add the globalization parameter in the webconfig but it seems that this way doesn't work.</p>
  
  <p>The jQuery part : </p>
  
  <pre><code>@section Scripts {
  @Scripts.Render("~/bundles/jqueryval")
  @Scripts.Render("~/bundles/jqueryui")
  @Styles.Render("~/Content/themes/base/css")
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $(".datepicker").datepicker({
              changeMonth: true,
              changeYear: true,
  
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>}</p>
  
  <p>My create View : </p>
  
  <pre><code>    @using (Html.BeginForm())
  {
      @Html.ValidationSummary(true)
  
      &lt;fieldset&gt;
          &lt;legend&gt;Person&lt;/legend&gt;
          &lt;div class="editor-label"&gt;
              First name :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBoxFor(model =&gt; model.FirstName, new { maxlength = 50 })
              @Html.ValidationMessageFor(model =&gt; model.FirstName)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              Last name :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBoxFor(model =&gt; model.LastName, new { maxlength = 50 })
              @Html.ValidationMessageFor(model =&gt; model.LastName)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              National number :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBoxFor(model =&gt; model.NumNat, new { maxlength = 11 })
              @Html.ValidationMessageFor(model =&gt; model.NumNat)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              Start date :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBoxFor(model =&gt; model.StartDate, new { @class = "datepicker" })
              @Html.ValidationMessageFor(model =&gt; model.StartDate)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              End date :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.TextBoxFor(model =&gt; model.EndDate, new { @class = "datepicker"})
              @Html.ValidationMessageFor(model =&gt; model.EndDate)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              Distance House - Work (km) :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.HouseToWorkKilometers)
              @Html.ValidationMessageFor(model =&gt; model.HouseToWorkKilometers)
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              Category :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.DropDownList("Id_ProductPackageCategory", "Choose one ...")
              @Html.ValidationMessageFor(model =&gt; model.Id_ProductPackageCategory) &lt;a href="../ProductPackageCategory/Create"&gt;
                  Add a new category?&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="editor-label"&gt;
              Upgrade? :
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.Upgrade)
              @Html.ValidationMessageFor(model =&gt; model.Upgrade)
          &lt;/div&gt;
          &lt;p&gt;
              &lt;input type="submit" value="Create" /&gt;
          &lt;/p&gt;
      &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>Any idea to resolve this problem?</p>
  
  <p>EDIT : When I modify and put my date format as a "dd/mm/yy" format, an validation error appears saying "The field StartDate must be a date." and if I change the format as a "mm/dd/yy" format, an ohter validation error appears saying "The field StartDate must be a date."</p>