Last change
on this file since 24245 was 24245, checked in by sjb48, 13 years ago |
Oran code for supporting format changes to document.
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <title>jQuery UI Datepicker - Display multiple months</title>
|
---|
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
---|
6 | <script type="text/javascript" src="../../jquery-1.4.1.js"></script>
|
---|
7 | <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
---|
8 | <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
---|
9 | <script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
|
---|
10 | <link type="text/css" href="../demos.css" rel="stylesheet" />
|
---|
11 | <script type="text/javascript">
|
---|
12 | $(function() {
|
---|
13 | var dates = $('#from, #to').datepicker({
|
---|
14 | defaultDate: "+1w",
|
---|
15 | changeMonth: true,
|
---|
16 | numberOfMonths: 3,
|
---|
17 | onSelect: function(selectedDate) {
|
---|
18 | var option = this.id == "from" ? "minDate" : "maxDate";
|
---|
19 | var instance = $(this).data("datepicker");
|
---|
20 | var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
|
---|
21 | dates.not(this).datepicker("option", option, date);
|
---|
22 | }
|
---|
23 | });
|
---|
24 | });
|
---|
25 | </script>
|
---|
26 | </head>
|
---|
27 | <body>
|
---|
28 |
|
---|
29 | <div class="demo">
|
---|
30 |
|
---|
31 | <label for="from">From</label>
|
---|
32 | <input type="text" id="from" name="from"/>
|
---|
33 | <label for="to">to</label>
|
---|
34 | <input type="text" id="to" name="to"/>
|
---|
35 |
|
---|
36 | </div><!-- End demo -->
|
---|
37 |
|
---|
38 | <div class="demo-description">
|
---|
39 |
|
---|
40 | <p>Select the date range to search for.</p>
|
---|
41 |
|
---|
42 | </div><!-- End demo-description -->
|
---|
43 |
|
---|
44 | </body>
|
---|
45 | </html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.