title: I.E vs Chrome display differences
body: <p>Just wondering if there is any information about on some difference between Chrome and I.E when rendering some displays from an ASP.NET mvc web app.</p>
  
  <p>For example</p>
  
  <pre><code>[DataType(DataType.Date, ErrorMessage = "Incorrect format or missing date")]
  [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
  public DateTime? StartDate { get; set; }
  </code></pre>
  
  <p>in I.E it is just a plain white box to enter characters where as chrome displays dd/mm/yyyy and keeps that format.</p>
  
  <p>Same with time:</p>
  
  <pre><code>[DataType(DataType.Time, ErrorMessage = "Incorrect time")]             
  //[RequiredIfTrue("MondayTrue", ErrorMessage ="Day has been marked as working")]
  public DateTime? MondayStart { get; set; }
  </code></pre>
  
  <p>plain white box in I.E where as chrome has it --:--</p>
  
  <p>Is there a way to get these attributes to work in I.E?</p>
  
  <p>I.e html line</p>
  
  <pre><code>&lt;input name="StartDate" class="div-form-control text-box single-line" id="txtStartDate" type="date" value="" data-val-date="The field StartDate must be a date." data-val="true"&gt;
  </code></pre>
  
  <p>chrome html line</p>
  
  <pre><code>&lt;input class="div-form-control text-box single-line" data-val="true" data-val-date="The field StartDate must be a date." id="txtStartDate" name="StartDate" type="date" value=""&gt;
  </code></pre>
  
  <p>should have added, im using I.E 11 so thought this would have worked.</p>
  
  <p>in my MVC layout page, </p>
  
  <p>these partial views are rendered in the detailview div:</p>
  
  <pre><code>&lt;div class="containerBody"&gt;
      &lt;div id="detailView"&gt;&lt;/div&gt;       
  &lt;/div&gt;
  </code></pre>
  
  <p>View </p>
  
  <pre><code> &lt;div style="display: table-row;"&gt;               
                  &lt;div class="div-label-text" , style="display: table-cell"&gt; @Html.LabelFor(model =&gt; model.StartDate) &lt;/div&gt;
                  &lt;div class="div-EditorFor" , style="display: table-cell"&gt; @Html.EditorFor(model =&gt; model.StartDate, new { htmlAttributes = new { @class = "div-form-control", id = "txtStartDate" } }) &lt;/div&gt;
                  &lt;div class="div-val-cell" , style="display: table-cell"&gt; @Html.ValidationMessageFor(model =&gt; model.StartDate, "", new { @class = "text-danger" }) &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>