title: MVC EditorFor Date not showing Value
body: <p>I want to display a date in German date format (dd.MM.yyyy) from the model in an MVC app and provide the user a datepicker. I've gone throug a lot of the questions that have already been answered on this topic, but still can't get it to work. I tried it in  Firefox and Edge, with the same results for each step. </p>
  
  <p><strong>Step 1:</strong></p>
  
  <p>Model: </p>
  
  <pre><code>private DateTime? inbetriebnahmedatum;
  
  public DateTime? Inbetriebnahmedatum
  {               
      get { return inbetriebnahmedatum; }
      set { inbetriebnahmedatum = value; OnPropertyChanged(new PropertyChangedEventArgs("Inbetriebnahmedatum")); }
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@Html.EditorFor(model =&gt; model.Inbetriebnahmedatum, new { htmlAttributes = new { @class = "form-control", placeholder = "Datum eingeben" } })
  </code></pre>
  
  <p>Result: No Datepicker, Time is displayed, Validation error
  <a href="https://i.stack.imgur.com/zeNMQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zeNMQ.png" alt="enter image description here"></a></p>
  
  <p><strong>Step 2: Added DataType</strong></p>
  
  <p>Model:</p>
  
  <pre><code>private DateTime? inbetriebnahmedatum;
  
  [DataType(DataType.Date)]
  public DateTime? Inbetriebnahmedatum
  {
      get { return inbetriebnahmedatum; }
      set { inbetriebnahmedatum = value; OnPropertyChanged(new PropertyChangedEventArgs("Inbetriebnahmedatum")); }
  }
  </code></pre>
  
  <p>View: unchanged</p>
  
  <p>Result: Value not loaded.
  <a href="https://i.stack.imgur.com/saFXW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/saFXW.png" alt="enter image description here"></a></p>
  
  <p><strong>Step 3: DisplayFormat added, Datatype removed</strong></p>
  
  <p>Model:</p>
  
  <pre><code>private DateTime? inbetriebnahmedatum;
  
  [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd.MM.yyyy}")]
  public DateTime? Inbetriebnahmedatum
  {
      get { return inbetriebnahmedatum; }
      set { inbetriebnahmedatum = value; OnPropertyChanged(new PropertyChangedEventArgs("Inbetriebnahmedatum")); }
  }
  </code></pre>
  
  <p>View: unchanged</p>
  
  <p>Result: Date displayed, but no datepicker and Validation Error
  <a href="https://i.stack.imgur.com/mLFHx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mLFHx.png" alt="enter image description here"></a></p>
  
  <p><strong>Step 4: Addedd ui Culture to Web.config</strong></p>
  
  <p>Web.config</p>
  
  <pre><code>&lt;globalization uiCulture="de-DE" culture="de-DE" /&gt;
  </code></pre>
  
  <p>Result: Same
  <a href="https://i.stack.imgur.com/SiG4Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SiG4Q.png" alt="enter image description here"></a></p>
  
  <p><strong>Step 5: Added Datatype again</strong></p>
  
  <p>Model: </p>
  
  <pre><code>private DateTime? inbetriebnahmedatum;
  
  [DataType(DataType.Date)]
  [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd.MM.yyyy}")]
  public DateTime? Inbetriebnahmedatum
  {
      get { return inbetriebnahmedatum; }
      set { inbetriebnahmedatum = value; OnPropertyChanged(new PropertyChangedEventArgs("Inbetriebnahmedatum")); }
  }
  </code></pre>
  
  <p>Result: Value not loaded, datepicker shows
  <a href="https://i.stack.imgur.com/YSO6k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YSO6k.png" alt="enter image description here"></a></p>