title: Set maxDate and minDate for datepicker in javascript, not working
body: <p>I have checked lot of tutorials and QAs in Google and tried with all permutation and combination tricks. Still my calender is not restricted with <code>maxDate</code> and <code>minDate</code> as I set. Please can someone check and let me know whats wrong with my code.</p>
  
  <p>my javascript function is</p>
  
  <pre><code>$(function () {
  
      $("[id$=txtPaymentDate]").datepicker({
          maxDate: "+0D",
          showOn: 'button',
          dateFormat: 'mm-dd-yyyy',
          buttonImageOnly: true
      });
  });
  </code></pre>
  
  <p>...and my <code>body</code> code:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;td&gt;
      &lt;asp:TextBox ID="txtPaymentDate" runat="server" CssClass="form-control" placeholder="(YYYY-MM-DD)"&gt;&lt;/asp:TextBox&gt;
      &lt;span id="spnAltContactNumber" style="color: Red;" runat="server"&gt;&lt;/span&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>Even though I've set <code>dateFormat as 'yyyy-mm-dd'</code>, it is still showing the date as <code>mm/dd/yyyy</code>.</p>
  
  <p>I have these following scripts. Is there any extra is required?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
  &lt;link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" /&gt;
  &lt;script type="text/javascript" src="js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"&gt;&lt;/script&gt;
  </code></pre>