title: EditorFor to enter Time only, can't set it up for 24 hours format
body: <p>I'm trying different things like different DataFormatString or even different controls to make it so it use 24 format but it keeps on AM/PM format, how to make it 24hs format?</p>
  
  <p><strong>EDIT:</strong>
  After more searching I realize this same code shows 24 hours format to some people, so I could reformulate to: What could be configured as AM/PM in my PC? I already changed the locale in web.config to a 24 hrs locale but the result is the same. My regional  settings is also 24 hours time.</p>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;div class="col-md-2"&gt;
      Horario teórico Desde
      @Html.EditorFor(model =&gt; model.HorarioTeoricoDesde, new { htmlAttributes = new { @class = "form-control form-control-sm" } })
      @Html.ValidationMessageFor(model =&gt; model.HorarioTeoricoDesde, "", new { @class = "text-danger" })
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>ViewModel:</strong></p>
  
  <pre><code>[Display(Name = "Horario Teorico Desde")]
  [Required(ErrorMessage = "El Horario Teorico Desde es Requerido")]
  [DataType(DataType.Time)]
  [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:HH:mm}")]
  public DateTime? HorarioTeoricoDesde { get; set; }
  </code></pre>
  
  <p>My Regional settings are 24 hs, spanish language. This is my web.config:</p>
  
  <pre><code>  &lt;system.web&gt;
      &lt;globalization culture="es-AR" uiCulture="es-AR" /&gt;
  </code></pre>
  
  <p><strong>This is how i see it:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/qpsGp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qpsGp.png" alt="This is how i see it:"></a></p>
  
  <p>Thanks!!</p>