-
Notifications
You must be signed in to change notification settings - Fork 29
/
example.html
193 lines (177 loc) · 11 KB
/
example.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!doctype html>
<html>
<head>
<title>Calendrical Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="jquery.calendrical.js"></script>
<link rel="stylesheet" href="calendrical.css" />
<style>
body {
font: 12px "Lucida Grande", Arial, sans-serif;
text-align: center;
}
pre {
font: 11px Menlo, Consolas, Monaco, "DejaVu Sans Mono", Courier, "Courier New";
}
#wrapper {
width: 960px;
text-align: left;
margin: 0 auto;
}
section {
display: inline-block;
margin-bottom: 15px;
}
div.demo input {
width: 100px;
}
div.demo strong {
width: 40px;
display: inline-block;
}
div.demo, div.html, div.javascript {
float: left;
width: 300px;
margin-right: 30px;
text-align: left;
}
div.javascript {
margin-right: 0;
}
</style>
</head>
<body>
<div id="wrapper">
<header>
<h1>Calendrical</h1>
</header>
<section>
<header>
<h2>Date and Time</h2>
</header>
<div class="demo">
<p>
<input id="date" type="text" />
<input id="time" type="text" />
</p>
<script>
$(function() {
$('#date').calendricalDate();
$('#time').calendricalTime();
});
</script>
</div>
<div class="html">
<pre>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"date"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"time"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font></pre>
</div>
<div class="javascript">
<pre>
$(<font color="#008000">'#date'</font>).calendricalDate()<font color="4444FF">;</font>
$(<font color="#008000">'#time'</font>).calendricalTime()<font color="4444FF">;</font></pre>
</div>
</section>
<section>
<header>
<h2>Date Range</h2>
</header>
<div class="demo">
<p>
<input id="date_start" type="text" />
<input id="date_end" type="text" />
</p>
<script>
$(function() {
$('#date_start, #date_end')
.calendricalDateRange();
});
</script>
</div>
<div class="html">
<pre>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"date_start"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"date_end"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font></pre>
</div>
<div class="javascript">
<pre>
$(<font color="#008000">'#date_start, #date_end'</font>)
.calendricalDateRange()<font color="4444FF">;</font></pre>
</div>
</section>
<section>
<header>
<h2>Time Range</h2>
</header>
<div class="demo">
<p>
<input id="time_start" type="text" />
<input id="time_end" type="text" />
</p>
<script>
$(function() {
$('#time_start, #time_end')
.calendricalTimeRange({meridiemUpperCase: true, endTime: {hour: 24, minute: 00}});
});
</script>
</div>
<div class="html">
<pre>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"time_start"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"time_end"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font></pre>
</div>
<div class="javascript">
<pre>
$(<font color="#008000">'#time_start, #time_end'</font>)
.calendricalTimeRange({
meridiemUpperCase: true,
endTime: {hour: 24, minute: 00}
})<font color="4444FF">;</font></pre>
</div>
</section>
<section>
<header>
<h2>DateTime Range</h2>
</header>
<div class="demo">
<p>
<strong>From:</strong>
<input id="dt_date_start" type="text" />
<input id="dt_time_start" type="text" />
</p>
<p>
<strong>To:</strong>
<input id="dt_date_end" type="text" />
<input id="dt_time_end" type="text" />
</p>
<script>
$(function() {
$('#dt_date_start, #dt_time_start,' +
'#dt_date_end, #dt_time_end')
.calendricalDateTimeRange({endTime: {hour: 24, minute: 00}});
});
</script>
</div>
<div class="html">
<pre><font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">p</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">strong</font><font color="4444FF"><strong>></strong></font></strong></font>From:<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">/strong</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"dt_date_start"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"dt_time_start"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">/p</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">p</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">strong</font><font color="4444FF"><strong>></strong></font></strong></font>To:<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">/strong</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"dt_date_end"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">input</font> <font color="#2040a0">id=</font><font color="#008000">"dt_time_end"</font> <font color="#2040a0">type=</font><font color="#008000">"text"</font> <font color="#2040a0">/</font><font color="4444FF"><strong>></strong></font></strong></font>
<font color="#2040a0"><strong><font color="4444FF"><strong><</strong></font><font color="#2040a0">/p</font><font color="4444FF"><strong>></strong></font></strong></font></pre>
</div>
<div class="javascript">
<pre>$(<font color="#008000">'#dt_date_start, #dt_time_start,'</font> +
<font color="#008000">'#dt_date_end, #dt_time_end'</font>)
.calendricalDateTimeRange({
{endTime: {hour: 24, minute: 00}
})<font color="4444FF">;</font></pre>
</div>
</section>
</div>
</body>
</html>