4 <title>jQuery UI Datepicker - Restrict date range</title>
5 <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6 <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
7 <script type="text/javascript" src="../../ui/ui.core.js"></script>
8 <script type="text/javascript" src="../../ui/ui.datepicker.js"></script>
9 <link type="text/css" href="../demos.css" rel="stylesheet" />
10 <script type="text/javascript">
12 $("#datepicker").datepicker({minDate: -20, maxDate: '+1M +10D'});
20 <p>Date: <input type="text" id="datepicker"></p>
22 </div><!-- End demo -->
24 <div class="demo-description">
26 <p>Restrict the range of selectable dates with the <code>minDate</code> and <code>maxDate</code> options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.</p>
28 </div><!-- End demo-description -->