title: datepicker display todays date as default and only for GET?
body: <p>MVC- using a datepicker, which when initially loads I would like to display todays date by default, I have been trying this but for today it is returning 03/9/2013, i need it to say dd/mm/yyyy - 25/09/2013.</p>
  
  <p>Then on the post back it will store whatever date the user has chosen, instead it jumps back to this date, so iv used a bool in the get isInitial, and set it to true, then in the post function set it to false, and in VIEW want to use code to display todays date, only IF(isInitial)...</p>
  
  <p>is this the correct way about this? Also any help on resolving todays date would be great thanks</p>
  
  <pre><code> &lt;div class="editor-label"&gt;@Html.TextBoxFor(model =&gt; model.SelectedDate, new { @class = "jquery_datepicker", @Value = Model.SelectedDate.HasValue ? Model.SelectedDate.Value.ToString("dd/MM/yyyy") : string.Empty })&lt;/div&gt;
  
  
  @using (Script.Foot())
      {
          &lt;script type="text/javascript" language="javascript"&gt;
              $(function () {
                  var dates = $("#SelectedDate").datepicker().val(dates);
              });
  
              $(function () {
                  var myDate = new Date();
                  var todayDate = myDate.getDay() + '/' + (myDate.getMonth() + 1) + '/' + myDate.getFullYear();
                  $("#SelectedDate").datepicker().val(todayDate);
              });
  
          &lt;/script&gt;
      }
  </code></pre>