title: how to restrict invalidate in input type datetime-local
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="datetime-local" step="1"&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>In that, how to avoid invalid date input. Suppose I am insert date like <strong>&quot;11:11:1111&quot;</strong>
  in &quot;mm-dd-yyyy&quot; format. how can solve this using Moment.js</p>