| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 |
<title>jQuery UI Datepicker - Restrict date range</title> |
| 7 |
<link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 |
<link rel="stylesheet" href="../demos.css"> |
| 9 |
<script src="../../external/requirejs/require.js"></script> |
| 10 |
<script src="../bootstrap.js"> |
| 11 |
$( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" }); |
| 12 |
</script> |
| 13 |
</head> |
| 14 |
<body> |
| 15 |
|
| 16 |
<p>Date: <input type="text" id="datepicker"></p> |
| 17 |
|
| 18 |
<div class="demo-description"> |
| 19 |
<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> |
| 20 |
</div> |
| 21 |
</body> |
| 22 |
</html> |