Subversion Repositories Sites.obs-saisons.fr

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
40 aurelien 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 rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
7
	<script src="../../jquery-1.4.2.js"></script>
8
	<script src="../../ui/jquery.ui.core.js"></script>
9
	<script src="../../ui/jquery.ui.widget.js"></script>
10
	<script src="../../ui/jquery.ui.datepicker.js"></script>
11
	<link rel="stylesheet" href="../demos.css">
12
	<script>
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
					instance = $( this ).data( "datepicker" );
21
					date = $.datepicker.parseDate(
22
						instance.settings.dateFormat ||
23
						$.datepicker._defaults.dateFormat,
24
						selectedDate, instance.settings );
25
				dates.not( this ).datepicker( "option", option, date );
26
			}
27
		});
28
	});
29
	</script>
30
</head>
31
<body>
32
 
33
<div class="demo">
34
 
35
<label for="from">From</label>
36
<input type="text" id="from" name="from"/>
37
<label for="to">to</label>
38
<input type="text" id="to" name="to"/>
39
 
40
</div><!-- End demo -->
41
 
42
 
43
 
44
<div class="demo-description">
45
<p>Select the date range to search for.</p>
46
</div><!-- End demo-description -->
47
 
48
</body>
49
</html>