equal
deleted
inserted
replaced
|
1 <!DOCTYPE html> |
|
2 <html lang="en"> |
|
3 <head> |
|
4 <meta charset="UTF-8" /> |
|
5 <title>jQuery UI Datepicker - Display multiple months</title> |
|
6 <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" /> |
|
7 <script type="text/javascript" src="../../jquery-1.4.2.js"></script> |
|
8 <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> |
|
9 <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> |
|
10 <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script> |
|
11 <link type="text/css" href="../demos.css" rel="stylesheet" /> |
|
12 <script type="text/javascript"> |
|
13 $(function() { |
|
14 var dates = $('#from, #to').datepicker({ |
|
15 defaultDate: "+1w", |
|
16 changeMonth: true, |
|
17 numberOfMonths: 3, |
|
18 onSelect: function(selectedDate) { |
|
19 var option = this.id == "from" ? "minDate" : "maxDate"; |
|
20 var instance = $(this).data("datepicker"); |
|
21 var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); |
|
22 dates.not(this).datepicker("option", option, date); |
|
23 } |
|
24 }); |
|
25 }); |
|
26 </script> |
|
27 </head> |
|
28 <body> |
|
29 |
|
30 <div class="demo"> |
|
31 |
|
32 <label for="from">From</label> |
|
33 <input type="text" id="from" name="from"/> |
|
34 <label for="to">to</label> |
|
35 <input type="text" id="to" name="to"/> |
|
36 |
|
37 </div><!-- End demo --> |
|
38 |
|
39 <div class="demo-description"> |
|
40 |
|
41 <p>Select the date range to search for.</p> |
|
42 |
|
43 </div><!-- End demo-description --> |
|
44 |
|
45 </body> |
|
46 </html> |