title: How do you display a jQuery datepicker with a blank date in MVC 4
body: <p>I have a model with a DateTime property as well as other properties, but here is the date one. </p>
  
  <pre><code>    [DataType(DataType.Date)]
      [Display(Name = "Date")]
      public DateTime Date { get; set; }
  </code></pre>
  
  <p>I am using EditorFor in my cshtml file </p>
  
  <pre><code>@model DatePickerDemo.Model.MyModel
  @using (Html.BeginForm())
  {
      @Html.EditorFor(model =&gt; model.Date)
  }
  </code></pre>
  
  <p>I have an editor template</p>
  
  <pre><code>@model DateTime
  @Html.TextBox("", Model.ToShortDateString(), new {@class = "datepicker" })
  </code></pre>
  
  <p>If I pass the View a model with a valid date this works beautifully. But I need to display a form with empty dates. My business model allows for null dates. When there are dates I want to display them, when there are null dates I want the date text boxes empty. This shouldn't be too hard to do. I see solutions where this is possible using straight html/js but not in MVC. 
  I assume I need to change my model to have nullable dates but nothing I have tried so far gets me past an error on my <code>@Html.EditorFor</code> line. The error I get is this:</p>
  
  <p>The model item passed into the dictionary is null, but this dictionary requires a non-null model item of type 'System.DateTime'.</p>