aboutsummaryrefslogtreecommitdiffstats
path: root/demos/datepicker/date-range.html
diff options
context:
space:
mode:
authorKyle Wilkinson <kai@wikyd.org>2010-11-19 15:54:49 -0800
committerScott González <scott.gonzalez@gmail.com>2010-11-21 09:41:27 -0500
commitf070b0a24b7f44b69edfdcd790fd5b72883c11ae (patch)
tree376742603bb93c2c1962d1c6b8ae40f85a604195 /demos/datepicker/date-range.html
parentddf59462af7fb986bb06c0b6d0101086b0702f5b (diff)
downloadjquery-ui-f070b0a24b7f44b69edfdcd790fd5b72883c11ae.tar.gz
jquery-ui-f070b0a24b7f44b69edfdcd790fd5b72883c11ae.zip
Datepicker Demo: modifed the name of the event search demo to be date-range. Fixed #6675 - Date Range demo for Datepicker has unclear title.
Diffstat (limited to 'demos/datepicker/date-range.html')
-rw-r--r--demos/datepicker/date-range.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/demos/datepicker/date-range.html b/demos/datepicker/date-range.html
new file mode 100644
index 000000000..1e3beb2a2
--- /dev/null
+++ b/demos/datepicker/date-range.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Datepicker - Select a Date Range</title>
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.4.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.datepicker.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <script>
+ $(function() {
+ var dates = $( "#from, #to" ).datepicker({
+ defaultDate: "+1w",
+ changeMonth: true,
+ numberOfMonths: 3,
+ onSelect: function( selectedDate ) {
+ var option = this.id == "from" ? "minDate" : "maxDate",
+ instance = $( this ).data( "datepicker" );
+ date = $.datepicker.parseDate(
+ instance.settings.dateFormat ||
+ $.datepicker._defaults.dateFormat,
+ selectedDate, instance.settings );
+ dates.not( this ).datepicker( "option", option, date );
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="from">From</label>
+<input type="text" id="from" name="from"/>
+<label for="to">to</label>
+<input type="text" id="to" name="to"/>
+
+</div><!-- End demo -->
+
+
+
+<div class="demo-description">
+<p>Select the date range to search for.</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>