title: Why is my DisplayFor not looping through my IEnumerable<DateTime>?
body: <p>I have this line in my view</p>
  
  <pre><code>@(Html.DisplayFor(m =&gt; m.DaysOfWeek, "_CourseTableDayOfWeek"))
  </code></pre>
  
  <p>where <code>m.DaysOfWeek</code> is a <code>IEnumerable&lt;DateTime&gt;</code>.</p>
  
  <p>There is the content of _CourseTableDayOfWeek.cshtml:</p>
  
  <pre><code>@model DateTime
  @{
      ViewBag.Title = "CourseTableDayOfWeek";
  }
  &lt;th&gt;
      @System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.DayNames[(int) Model.DayOfWeek]
      &lt;span class="dateString"&gt;Model.ToString("G")&lt;/span&gt;
  &lt;/th&gt;
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <blockquote>
    <p>The model item passed into the dictionary is of type '<code>System.Collections.Generic.List`1[System.DateTime]</code>', but this dictionary requires a model item of type '<code>System.DateTime</code>'.</p>
  </blockquote>
  
  <p>If I refer to the following post:</p>
  
  <p><a href="https://stackoverflow.com/a/5652524/277067">https://stackoverflow.com/a/5652524/277067</a></p>
  
  <p>The <code>DisplayFor</code> should be looping through the IEnumerable and display the template for each item, shouldn't it?</p>