title: How to reset to min date in HTML input type date
body: <p>I am setting the minimum date in html5 date input, but I can still select a date prior to minimum date using date up/down arrow.</p>
  
  <p>For example I have set the min date to <code>2018-02-22</code> but once I have selected the month or date using down arrow a date prior to min date is getting selected. </p>
  
  <p>Can I restrict it using any HTML date property</p>
  
  <p><strong>Setting min date and selecting it</strong></p>
  
  <p><a href="https://i.stack.imgur.com/NtXiP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NtXiP.png" alt="Setting min date and selecting it"></a></p>
  
  <p><strong>Able to select previous date &amp; getting date in the console</strong></p>
  
  <p><a href="https://i.stack.imgur.com/czF2o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/czF2o.png" alt="Able to select previous date"></a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById('button').addEventListener('click', function() {
    var x = document.getElementById('date').value;
    console.log(x);
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="date" min="2018-02-22" id="date"&gt;
  &lt;button type="button" id="button"&gt;Get Date&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>