title: How to disable future dates after a week in input type = date?
body: <p>I have an <code>input</code> box of <code>type=date</code>. I want it to disable all dates after one week from current date. Suppose current date is 11/07/2017, I want all dates from 18/07/2017 to be disabled. So the user can select only dates within one week from today. I've already disabled the past dates in my code.</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>function validDate(){
      var today = new Date().toISOString().split('T')[0];
      document.getElementsByName("date")[0].setAttribute('min', today);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body onload="validDate()"&gt;
    &lt;div class="form-group"&gt;
       &lt;p&gt;Date&lt;span&gt;*&lt;/span&gt;&lt;/p&gt;
       &lt;input type="date" name="date" id="date" class="form-control input-sm " required /&gt;
    &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>