summaryrefslogtreecommitdiff
path: root/engines/kokompe/temp/jquery.ui/demos/ui.datepicker.html
blob: dc3c5c206103442877d81f901c53aa66870020ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Datepicker Demo</title>
<link rel="stylesheet" href="../themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<style type="text/css">
pre { border: 1px solid #50A029; padding: 5px; padding-top: 15px; }
.codeLink { text-decoration: underline; }
</style>

<script src="../jquery-1.2.3.min.js" type="text/javascript"></script>

<script type="text/javascript" src="../datepicker/core/ui.datepicker.js"></script>
<script type="text/javascript" src="../datepicker/i18n/ui.datepicker-fr.js"></script>
</head>
<body class="flora">
<h1>Datepicker</h1>

<h2>1. Default</h2>
<div class="playground">
	<p>Datepicker appears on focus - click in the field.
		The text is in English and the date format is US (mm/dd/yyyy).</p>
	<input type="text" id="example1" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example1').datepicker();	
	</script>
</div>

<h2>2. Enhanced</h2>
<div class="playground">
	<p>Datepicker appears on focus or icon click.
		It shows days in other months and the week of the year.</p>
	<input type="text" id="example2" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example2').datepicker({showOn: 'both', showOtherMonths: true, 
		showWeeks: true, firstDay: 1, changeFirstDay: false,
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>3. Localized</h2>
<div class="playground">
	<p>The datepicker can be localized for a large number of languages.
		Here is the French version.</p>
	<input type="text" id="example3" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example3').datepicker($.extend({showOn: 'both',
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'},
		$.datepicker.regional['fr']));
	</script>
</div>

<h2>4. Formats</h2>
<div class="playground">
	<p>The date can appear in a number of different formats with the 
		default being 'mm/dd/yyyy'. This example shows the full
		format with day and month names.</p>
	<input type="text" id="example4" size="30"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example4').datepicker({dateFormat: 'DD, MM d, yy', showOn: 'both', 
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>5. Date range</h2>
<div class="playground">
	<p>Pick a date range by selecting the start and end date.
		Several months are shown at once.</p>
	<input type="text" id="example5" size="24"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example5').datepicker({rangeSelect: true, numberOfMonths: 3, stepMonths: 3, 
		showOn: 'both', buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>6. Inline</h2>
<div class="playground">
	<p>The datepicker can also appear inline and notify the page when selected.</p>
	<div id="example6"></div>
	<div style="clear: both;"></div>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example6').datepicker({onSelect: function(date) { alert('You selected ' + date); }});	
	</script>
</div>

<h2>More...</h2>
<div class="playground">
	<p>The datepicker can do even more. Check out the full demonstration on the
		<a href="http://marcgrabanski.com/code/ui-datepicker/">datepicker home page</a>.</p>
</div>

<script type="text/javascript">
if (!window.console) {
	window.console = {
		log: function() {
			alert(arguments[0]);	
		}
	}
}

$(window).bind("load",function(){
	$.datepicker.setDefaults($.datepicker.regional['']);
	$(".demojs").each(function () {
		$(this).before('<div class="codeLink">Show the code</div>' +
			'<pre style="display: none;">' + $(this).html() + '</pre>');
		$('.codeLink').click(function() {
			$(this).hide().siblings('pre').show();
		});
		eval($(this).html());
	});
});
</script>
</body>
</html>