-
Notifications
You must be signed in to change notification settings - Fork 12
/
demo.html
executable file
·247 lines (217 loc) · 11.7 KB
/
demo.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="The pure JavaScript ultimate datepicker">
<meta name="author" content="MTR Design">
<meta name="keywords" content="datepicker, mtr datepicker, mtr design, pure javascript, javascript datepicker, js datepicker">
<title>Demo | MTR Datepicker - The pure JavaScript datepicker library</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" type="text/css" href="libs/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="demo/cosmo.bootstrap.min.css">
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.min.css?rel=1452001556058" />
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.default-theme.min.css?rel=1452001556059" />
<link rel="stylesheet" type="text/css" href="demo/jumbotron-narrow.css" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=yyxxeK88Mx">
<link rel="icon" type="image/png" href="/images/favicons/favicon-32x32.png?v=yyxxeK88Mx" sizes="32x32">
<link rel="icon" type="image/png" href="/images/favicons/favicon-16x16.png?v=yyxxeK88Mx" sizes="16x16">
<link rel="manifest" href="/images/favicons/manifest.json?v=yyxxeK88Mx">
<link rel="mask-icon" href="/images/favicons/safari-pinned-tab.svg?v=yyxxeK88Mx" color="#5bbad5">
<link rel="shortcut icon" href="/images/favicons/favicon.ico?v=yyxxeK88Mx">
<meta name="apple-mobile-web-app-title" content="MTR Datepicker">
<meta name="application-name" content="MTR Datepicker">
<meta name="msapplication-config" content="/images/favicons/browserconfig.xml?v=yyxxeK88Mx">
<meta name="theme-color" content="#ffffff">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fork me button -->
<a href="https://github.com/mtrdesign/mtr-datepicker">
<img style="position: fixed; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub" class="github-corner" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
</a>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://mtrdesign.github.io/mtr-datepicker/">MTR Datepicker</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li role="presentation" class="active"><a href="demo.html#demo">Demo</a></li>
<li role="presentation"><a href="docs.html">Docs</a></li>
<li role="presentation"><a href="https://github.com/mtrdesign/mtr-datepicker" target="_blank">GitHub</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<h1 id="demo" class="text-center">Demo</h1>
<hr />
<div class="row marketing">
<div class="col-sm-6 col-md-4">
<div id="datepicker-demo-custom"></div>
</div>
<div class="col-sm-6 col-md-4">
<h4>Customize the datepicker</h4>
<label>
<input id="datepicker-demo-input-show-datepicker" type="checkbox" checked />
Show date picker
</label>
<br />
<label>
<input id="datepicker-demo-input-customize-future" type="checkbox" />
Only future dates
</label>
<br />
<label>
<input id="datepicker-demo-input-show-timepicker" type="checkbox" checked />
Show time picker
</label>
<br />
<label>
<input id="datepicker-demo-input-customize-smart-ampm" type="checkbox" />
Smart AM/PM switching
</label>
<label>
<input id="datepicker-demo-input-customize-disable-ampm" type="checkbox" />
Disable AM/PM (go to 24 hours time format)
</label>
<br />
<label>
<input id="datepicker-demo-input-customize-minutes" type="checkbox" data-toggle="collapse" data-target="#collapseMinutes" />
Customize Minutes
</label>
<div class="collapse" id="collapseMinutes">
<div class="well">
<div class="input-group">
<span class="input-group-addon">Min:</span>
<input id="datepicker-demo-input-customize-minutes-min" type="number" min="0" max="59" class="form-control" value="0" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Max:</span>
<input id="datepicker-demo-input-customize-minutes-max" type="number" min="0" max="59" class="form-control" value="50" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Step:</span>
<input id="datepicker-demo-input-customize-minutes-step" type="number" min="0" max="59" class="form-control" value="10" >
</div>
</div>
</div>
<br />
<label>
<input id="datepicker-demo-input-customize-months" type="checkbox" data-toggle="collapse" data-target="#collapseMonths" />
Customize Months
</label>
<div class="collapse" id="collapseMonths">
<div class="well">
<div class="input-group">
<span class="input-group-addon">Min:</span>
<input id="datepicker-demo-input-customize-months-min" type="number" min="0" max="11" class="form-control" value="0" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Max:</span>
<input id="datepicker-demo-input-customize-months-max" type="number" min="0" max="11" class="form-control" value="11" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Step:</span>
<input id="datepicker-demo-input-customize-months-step" type="number" min="0" max="11" class="form-control" value="1" >
</div>
</div>
</div>
<br />
<label>
<input id="datepicker-demo-input-customize-years" type="checkbox" data-toggle="collapse" data-target="#collapseYears" />
Customize Years
</label>
<div class="collapse" id="collapseYears">
<div class="well">
<div class="input-group">
<span class="input-group-addon">Min:</span>
<input id="datepicker-demo-input-customize-years-min" type="number" min="1970" max="2050" class="form-control" value="2000" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Max:</span>
<input id="datepicker-demo-input-customize-years-max" type="number" min="1970" max="2050" class="form-control" value="2030" >
</div>
<br />
<div class="input-group">
<span class="input-group-addon">Step:</span>
<input id="datepicker-demo-input-customize-years-step" type="number" min="1" max="50" class="form-control" value="1" >
</div>
</div>
</div>
<br /><br />
<a href="https://jsfiddle.net/mtr_datepicker/469qq7xv/" target="_blank">More customizable demo</a>
</div>
<div class="col-sm-6 col-sm-offset-6 col-md-4 col-md-offset-0">
<h4>Export formats</h4>
<div id="datepicker-demo-custom-export-formats"></div>
</div>
</div>
<footer class="footer">
<a href="http://mtr-design.com/" class="pull-right" target="_blank"><img src="images/mtr_logo.png" /></a>
<p class="pull-left">MTR Datepicker is open source and available under the GPL license.</p>
<div class="clearfix"></div>
<p class="pull-left">Powered by <a href="http://www.mtr-design.com" target="_blank">MTR Design</a> © 2015 - 2020</p>
</footer>
</div> <!-- /container -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="scripts/mtr-datepicker-timezones.js"></script>
<script type="text/javascript" src="scripts/mtr-datepicker.js"></script>
<script type="text/javascript" src="demo/demo.js"></script>
<script type="text/javascript">
var initDate = new Date(2010, 10, 21);
var demoDatepicker = MtrDatepickerDemo.init({
target: 'datepicker-demo-custom',
timestamp: initDate.getTime()
}, {
exportFormats: 'datepicker-demo-custom-export-formats',
customizeFuture: 'datepicker-demo-input-customize-future',
customizeSmartAmPm: 'datepicker-demo-input-customize-smart-ampm',
customizeDisableAmPm: 'datepicker-demo-input-customize-disable-ampm',
showDatePicker: 'datepicker-demo-input-show-datepicker',
showTimePicker: 'datepicker-demo-input-show-timepicker',
customizeMinutes: 'datepicker-demo-input-customize-minutes',
customizeMinutesMin: 'datepicker-demo-input-customize-minutes-min',
customizeMinutesMax: 'datepicker-demo-input-customize-minutes-max',
customizeMinutesStep: 'datepicker-demo-input-customize-minutes-step',
customizeMonths: 'datepicker-demo-input-customize-months',
customizeMonthsMin: 'datepicker-demo-input-customize-months-min',
customizeMonthsMax: 'datepicker-demo-input-customize-months-max',
customizeMonthsStep: 'datepicker-demo-input-customize-months-step',
customizeYears: 'datepicker-demo-input-customize-years',
customizeYearsMin: 'datepicker-demo-input-customize-years-min',
customizeYearsMax: 'datepicker-demo-input-customize-years-max',
customizeYearsStep: 'datepicker-demo-input-customize-years-step',
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72115428-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>