title: How can I show correctly Dates yyyy-MM-dd hh:mm:ss with HTML5 and Angularjs?
body: <p>I'm trying to create an input with date and time but I don't get the way of doing it.</p>
  
  <p>I've tried with input <strong>datetime</strong>, </p>
  
  <pre><code>&lt;tr&gt;
    &lt;td&gt;Date&lt;/td&gt;
      &lt;td&gt;&lt;input type="datetime" name="fecha"
      placeholder="dd-MM-dd HH:mm:ss" size="16"
      ng-model="data.action.date" /&gt;&lt;/td&gt;
    &lt;tt&gt;value = {{data.action.date | date: "yyyy-MM-dd HH:mm:ss"}}&lt;/tt&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and I get this</p>
  
  <p><img src="https://i.stack.imgur.com/M5DaS.png" alt="enter image description here"></p>
  
  <p>And I've tried as well input <strong>datetime-local</strong> like the <a href="https://docs.angularjs.org/api/ng/input/input%5BdateTimeLocal%5D" rel="nofollow noreferrer">example</a> in angular doc</p>
  
  <pre><code>&lt;tr&gt;
    &lt;td&gt;Date&lt;/td&gt;
      &lt;td&gt;&lt;input type="datetime-local" name="fecha"
      placeholder="dd-MM-dd HH:mm:ss" size="16"
      ng-model="data.action.date" /&gt;&lt;/td&gt;
    &lt;tt&gt;value = {{data.action.date | date: "yyyy-MM-dd HH:mm:ss"}}&lt;/tt&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and I get this</p>
  
  <p><img src="https://i.stack.imgur.com/3J4R8.png" alt="enter image description here"></p>
  
  <p>How could I show the input with a date and time?</p>