title: MVC 3 Editor Template with DateTime
body: <p>I want to change this code from MVC2 </p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;System.DateTime?&gt;" %&gt;
  
    &lt;%=Html.TextBox("", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = "datePicker" }) %&gt;
  </code></pre>
  
  <p>To MVC 3 using Razor. </p>
  
  <p>You can find the full post of what I want to do <a href="http://geekswithblogs.net/michelotti/archive/2010/02/05/mvc-2-editor-template-with-datetime.aspx" rel="noreferrer">here</a></p>