title: How to disable previous days from today
body: <p>I would like to request assistance on how I can show a specific dates on my date picker, blocking the weekends and disable the previous days from today.</p>
  <p><strong>Month shown only:</strong> June and July<br>
  <strong>Days:</strong> June 1 to July 31<br>
  <em>Disable the weekend</em>s<br>
  <em>Disable the previous days from today</em></p>
  <pre><code>&lt;input id=&quot;date1&quot; type=&quot;date&quot; min=&quot;2021-06-01&quot; max=&quot;2021-07-31&quot; name=&quot;APPOINTMENTDATE&quot; data-field-type=&quot;Text&quot;&gt;
  
  &lt;script&gt;
  const picker = document.getElementById('date1');
  picker.addEventListener('input', function(e){
    var day = new Date(this.value).getUTCDay();
    if([6,0].includes(day)){
      e.preventDefault();
      this.value = '';
      alert('Weekends not allowed');
    }
  });
  &lt;/script&gt;
  </code></pre>