title: show only the date in @Html.EditorFor helper
body: <p>I am trying to populate <code>@Html.EditorFor</code> helper. I have created a view model with the below property</p>
  <pre><code>[DataType(DataType.Date, ErrorMessage=&quot;Date only&quot;)]
  [DisplayFormat(DataFormatString = &quot;{0:dd/MM/yy}&quot;, ApplyFormatInEditMode = true)]
  public DateTime? YearBought { get; set; }
  </code></pre>
  <p>and my helper is set up as below (a)</p>
  <pre><code>@Html.ValidationMessageFor(m =&gt; m.YearBought)
  @Html.EditorFor(model =&gt; model.YearBought, new { @type = &quot;date&quot; })
  </code></pre>
  <p>I have also tried (b)</p>
  <pre><code>@Html.ValidationMessageFor(m =&gt; m.YearBought)
  @Html.EditorFor(model =&gt; model.YearBought.Value.Date)
  </code></pre>
  <p>Using the above format (a) nothing is displayed. Using the above format (b) <code>12/05/2014 00:00:00</code> is displayed in textbox format.</p>
  <p>I am trying to achieve a datepicker format without a time displayed</p>
  <p>I have reviewed several other questions but cant see what i've done different.</p>
  <p>When I look in my database, the value is save as <code>2014-05-12</code> and when I am saving the value the EditorFor helper generates the required input facility</p>
  <h1>questions reviewed</h1>
  <p><a href="https://stackoverflow.com/questions/25086909/how-to-use-html-textboxfor-with-input-type-date">first</a> <a href="https://stackoverflow.com/questions/1961114/date-only-from-textboxfor">second</a> <a href="https://stackoverflow.com/questions/7124434/display-only-date-and-no-time">third</a>....the list goes on</p>
  <p>EDIT
  just opened the console in chrome dev tools and so this message</p>
  <blockquote>
  <p>The specified value &quot;12/05/14&quot; does not conform to the required format, &quot;yyyy-MM-dd&quot;</p>
  </blockquote>
  <p>I thought <code>DisplayFormat(DataFormatString = &quot;{0:dd/MM/yy}&quot;</code> was defining how to display my date?</p>