title: How to use Html.TextBoxFor with input type=date?
body: <p>I want to implement  in my code.  To that end, I have the following:</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.CreationDate, new { @type = "date" })
  </code></pre>
  
  <p>This code generates the following HTML:</p>
  
  <pre><code>&lt;input data-val="true" data-val-date="The field CreationDate must be a date." 
               data-val-required="The CreationDate field is required." 
               id="CreationDate" name="CreationDate" type="date" 
               value="09/05/2012 15:02:19"&gt;
  </code></pre>
  
  <p>The value does not show up on the web page because type="date" expects data in YYYY-MM-DD format.  </p>
  
  <p>I've tried formatting the date, but that blows up, of course.</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.CreationDate.ToString("YYYY-MM-DD"), 
                   new { @type = "date" })
  </code></pre>
  
  <p>How do I use TextBoxFor method to properly display the  construct?
  Or should I be using some other method (I already tried EditorFor but failed)?</p>
  
  <p><code>CreationDate</code> is of type DateTime.</p>