title: How to set a current date to datepicker in MVC?
body: <p>I have a quiet simple question for my project in MVC, about jqueryui datepicker.</p>
  
  <p>This is my class:</p>
  
  <pre><code>public class User
  {
      public int UserID { get; set; }
      public string UserName { get; set; }
      public System.DateTime Birthdate { get; set; }
  }
  </code></pre>
  
  <p>I want to edit a user, this is my view page:</p>
  
  <pre><code>    @using (Html.BeginForm())
                          {
          @Html.AntiForgeryToken()
          @Html.ValidationSummary(true)
  
      &lt;fieldset&gt;
          &lt;legend&gt;EntitiesList&lt;/legend&gt;
  
          @Html.HiddenFor(model =&gt; model.UserID)
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.UserName)
              @Html.TextBoxFor(model =&gt; model.UserName, new { @value = @Model.UserName })
              @Html.ValidationMessageFor(model =&gt; model.UserName )
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Birthdate)
              @Html.TextBoxFor(model =&gt; model.Birthdate, new { @class = "date", value = @Model.Birthdate })
              @Html.ValidationMessageFor(model =&gt; model.Birthdate)
          &lt;/div&gt;
      &lt;/fieldset&gt;
  }
  </code></pre>
  
  <p>and in the end of the file:</p>
  
  <pre><code>$(document).ready(function{
  $(".date").datepicker();
  });
  </code></pre>
  
  <p>My only problem is that the current birthdate of the user is not showing, I'm getting in the editor text "mm/dd/yyyy" instead of the current birthdate that is already set in the database.</p>
  
  <p>What am I missing?</p>