forked from jonthornton/jquery-timepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
223 lines (185 loc) · 7.28 KB
/
index.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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Timepicker for jQuery</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.timepicker.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.timepicker.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css" />
<style type="text/css">
body { background: #fff; color: #333; font-family: helvetica, arial, sans-serif; margin: 30px; font-size: 15px; }
h1, h2, h3 { color: #000; }
h2, h3 { margin: 30px 0 10px 0; }
p, .p { margin: 10px 0 20px 0; }
input.time, input.date { font-size: 13px; }
input.time { width: 80px; }
input.date { width: 90px; }
a { color: #00f; }
h1 a { color: #000; }
image { border: 0; }
.example { border: 1px solid #ddd; background: #f4f4f4; padding: 10px; margin: 10px 0 20px 0; }
.example h3 { margin: 0 0 10px 0; }
.example p { margin: 20px 0 0 0; }
#container { margin: 0 auto; width: 700px; }
h1 { font-size: 3.8em; color: #000; margin-bottom: 3px; }
h1 .small { font-size: 0.4em; }
h1 a { text-decoration: none }
h2 { font-size: 1.5em; color: #000; }
.byline { font-size: 1.5em; font-weight: bold; margin: 20px 0 0 0; }
.byline a { text-decoration: none; }
.description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
.download { float: right; }
pre { background: #000; color: #fff; padding: 15px;}
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
.footer { text-align:center; padding-top:30px; font-style: italic; }
div.ui-datepicker { font-size: 11px; }
</style>
</head>
<body>
<a href="https://github.com/jonthornton/jquery-timepicker"><img style="position: absolute; top: 0; right: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
<div id="container">
<div class="download">
<a href="https://github.com/jonthornton/jquery.timepicker/zipball/master">
<img width="90" src="https://github.com/images/modules/download/zip.png" alt="download zip" /></a>
<a href="https://github.com/jonthornton/jquery.timepicker/tarball/master">
<img width="90" src="https://github.com/images/modules/download/tar.png" alt="download tar" /></a>
</div>
<h1><a href="https://github.com/jonthornton/jquery-timepicker">jquery.timepicker</a></h1>
<div class="byline">by <a href="https://github.com/jonthornton">jonthornton</a></div>
<div class="description">
A jQuery timepicker plugin inspired by Google Calendar.
</div>
<div class="example">
<script>
$(function() {
$('#basicExample').timepicker();
});
</script>
<h3>Basic Example</h3>
<p><input id="basicExample" type="text" class="time" /></p>
</div>
<div class="example">
<script>
$(function() {
$('#durationExample').timepicker({ 'minTime': '2:00pm', 'showDuration': true });
});
</script>
<h3>Duration Example</h3>
<p><input id="durationExample" type="text" class="time" /></p>
</div>
<div class="example">
<script>
$(function() {
$('#onselectExample').timepicker({
'onSelect': function() {
$('#onselectTarget').text($(this).val());
}
});
});
</script>
<h3>onSelect Example</h3>
<p>
<input id="onselectExample" type="text" class="time" />
<span id="onselectTarget" style="margin-left: 30px;"></span>
</p>
</div>
<div class="example">
<script>
$(function() {
$('#timeformatExample1').timepicker({ 'timeFormat': 'H:i:s' });
$('#timeformatExample2').timepicker({ 'timeFormat': 'h:i A' });
});
</script>
<h3>timeFormat Example</h3>
<p>timepicker.jquery uses the time portion of <a href="http://php.net/manual/en/function.date.php">PHP's date formatting commands</a>.</p>
<p><input id="timeformatExample1" type="text" class="time" /> <input id="timeformatExample2" type="text" class="time" /></p>
</div>
<div class="example">
<script>
$(function() {
$('#stepExample1').timepicker({ 'step': 15 });
$('#stepExample2').timepicker({ 'step': 60, 'className': 'foobar' });
});
</script>
<h3>Step Example</h3>
<p><input id="stepExample1" type="text" class="time" /> <input id="stepExample2" type="text" class="time" /></p>
</div>
<div class="example">
<script>
$(function() {
$('#selectButton').click(function(e) {
e.preventDefault();
$('#selectExample').timepicker();
$(this).hide();
});
});
</script>
<h3>Select Example</h3>
<p><select id="selectExample" class="time">
<option value="12:00am">12:00am</option>
<option value="1:00am">1:00am</option>
<option value="2:00am">2:00am</option>
<option value="3:00am">3:00am</option>
<option value="4:00am">4:00am</option>
<option value="5:00am">5:00am</option>
<option value="6:00am">6:00am</option>
<option value="7:00am">7:00am</option>
<option value="8:00am">8:00am</option>
<option value="9:00am">9:00am</option>
<option value="10:00am">10:00am</option>
<option value="11:00am">11:00am</option>
<option value="12:00pm">12:00pm</option>
<option value="1:00pm">1:00pm</option>
<option value="2:00pm">2:00pm</option>
<option value="3:00pm">3:00pm</option>
<option value="4:00pm">4:00pm</option>
<option value="5:00pm">5:00pm</option>
<option value="6:00pm">6:00pm</option>
<option value="7:00pm">7:00pm</option>
<option value="8:00pm">8:00pm</option>
<option value="9:00pm">9:00pm</option>
<option value="10:00pm">10:00pm</option>
<option value="11:00pm">11:00pm</option>
</select> <button id="selectButton">Convert to timepicker</button></p>
</div>
<div class="example">
<script src="datepair.js"></script>
<h3>Datepair Example</h3>
<p class="datepair">
<input type="text" class="date start" />
<input type="text" class="time start" /> to
<input type="text" class="time end" />
<input type="text" class="date end" />
</p>
</div>
<h2>Contact</h2>
<p><a href="http://tumblr.jonthornton.com">Jon Thornton</a> ([lastname].[firstname]@gmail.com)</p>
<h2>Download</h2>
<p>
You can download this project in either
<a href="https://github.com/jonthornton/jquery.timepicker/zipball/master">zip</a> or
<a href="https://github.com/jonthornton/jquery.timepicker/tarball/master">tar formats</a>. <br />
Get the source code on GitHub: <a href="https://github.com/jonthornton/jquery-timepicker">jonthornton/jquery.timepicker</a>
</p>
<div class="p">You can also clone the project with <a href="http://git-scm.com">Git</a>
by running:
<pre>$ git clone git://github.com/jonthornton/jquery-timepicker</pre>
</div>
<div class="footer">
© 2011 Jon Thornton
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-15605525-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>