title: How to disable the future date in the jquery datepicker
body: <p>I tried to disable the future date in date picker but thing is it has been disable the month and the year. </p>
  
  <p>following is the code.</p>
  
  <pre><code>    &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Week Calculation&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;link rel="stylesheet" href="css/jquery-ui.css" /&gt;
  
      &lt;script src="JavaScript/jquery-1.10.2.js"&gt;&lt;/script&gt;
      &lt;script src="JavaScript/jquery-ui.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="daterange"&gt;
          &lt;p&gt;Date1: &lt;input type="text" id="datepicker1" name="date1"&gt;&lt;/p&gt;
          &lt;p&gt;Date2: &lt;input type="text" id="datepicker2" name="date2"&gt;&lt;/p&gt;
        &lt;p&gt; &lt;label&gt; Enter search Text: &lt;/label&gt; &lt;input type="text" id="byrange" name="searchText"&gt; &lt;/p&gt;
          &lt;p&gt; &lt;input type="submit" /&gt;&lt;/p&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/GHcyT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GHcyT.png" alt="enter image description here"></a></p>