forked from KreutzerCode/configurable-date-input-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
322 lines (307 loc) · 12.4 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Polyfill Datepicker Demo</title>
<meta name="description" content="Polyfill Demo">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<link rel="shortcut icon" type="image/x-icon" href="favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<style>
body {
position: relative;
background-color: #a2d8f6;
font-family: Arial, Helvetica, sans-serif;
padding: 15px;
}
input {
width: 100%;
}
h1 {
font-size: 60px;
font-weight: bold;
text-align: center;
text-shadow: 2px 2px 2px #000000;
color: white;
word-wrap: Break-Word;
margin-bottom: 30px;
}
h2 {
font-size: 26px;
text-align: center;
margin-bottom: 30px;
}
.example-container {
height: 100%;
background-color: white;
border: solid 1px black;
padding: 30px;
}
.col {
margin-bottom: 30px;
}
.example-row {
margin-bottom: 10px;
}
.button {
min-width: 325px;
min-height: 90px;
border: solid 1px black;
font-size: 60px;
text-align: center;
line-height: 75px;
font-weight: bolder;
}
.download {
background-color: #ffffff;
color: #a2d8f6;
}
.npm {
background-color: #cc3534;
border: solid 1px #cc3534;
color: #ffffff;
}
.information {
border: solid 1px #f00;
}
.information p {
margin: 0;
}
.back {
background-color: transparent;
border: 0px;
padding: 0;
color: #ffffff;
font-size: 18px;
margin-bottom: 30px;
}
</style>
</head>
<body class="container-fluid">
<h1>Configurable Date-Input-Polyfill DEMO</h1>
<h2>The last date-input polyfill you will ever need. A fancy and lightweight date input with a high number of configuration options for all needs.</h2>
<div class="row">
<div class="col col-12 col-md-6 col-xl-4">
<div class="example-container">
<h2>Example Date-Input configuration</h2>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Normal Input date (default):
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with default configuration" type="date" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With value:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with preset value" type="date" value="2015-03-28" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With format ("date-format"):
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with configured date format" type="date" date-format="mm/dd/yyyy" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With format ("data-date-format"):
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with configured date format" type="date" data-date-format="mm/dd/yyyy" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With localization:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with german local" type="date" lang="de" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With monday as first week day:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with monday as first week day" type="date" data-first-day="mo" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With min and max configuration:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with configured min & max value" type="date" data-min="2008-03-01"
data-max="2015-02-01" />
</div>
</div>
<span>
...
</span>
</div>
</div>
<div class="col col-12 col-md-6 col-xl-4">
<div class="example-container">
<h2>Example Inputs with class configuration</h2>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
With type text & class (default):
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with default configuration" class="date-polyfill" type="text" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with value:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with preset value" class="date-polyfill" type="text" value="2020-03-28" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with format:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with configured date format" class="date-polyfill" type="text"
date-format="mm/dd/yyyy" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with localization:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with french local" class="date-polyfill" type="text" lang="fr" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with monday as first week day:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with monday as first week day" class="date-polyfill" type="text"
data-first-day="mo" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with a german configuration:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with german configuration" class="date-polyfill" type="text" lang="de"
data-date-format="dd.mm.yyyy" data-first-day="mo" />
</div>
</div>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Text & class with min and max value:
</span>
</div>
<div class="col-md-12 col-xl-5 example-input">
<input title="with configured min & max value" class="date-polyfill" type="text" data-min="2008-03-01"
data-max="2015-02-01" />
</div>
</div>
<span>
...
</span>
</div>
</div>
<div class="col col-12 col-md-12 col-xl-4">
<div class="example-container">
<h2>Fancy dynamic example</h2>
<div class="row example-row">
<div class="col-md-12 col-xl-7">
<span>
Dynamically created Input:
</span>
</div>
<div class="col-md-12 col-xl-4 example-input" id="dynamic-example">
<script>
setTimeout(function () {
var input = document.createElement("input");
input.setAttribute("type", "date");
document.getElementById("dynamic-example").appendChild(input);
}, 2000);
</script>
</div>
</div>
<span>
...
</span>
</div>
</div>
</div>
<div class="row">
<div class="col col-12 col-md-6 col-xl-4 text-center">
<button class="button download"
onclick="window.open('https://github.com/KreutzerCode/configurable-date-input-polyfill/archive/master.zip','_blank')">
Download
</button>
</div>
<div class="col col-12 col-md-6 col-xl-4 text-center">
<button class="button npm"
onclick="window.open('https://www.npmjs.com/package/configurable-date-input-polyfill','_blank')">
NPM
</button>
</div>
<div class="col col-12 col-md-12 col-xl-4">
<div class="information example-container">
<p>
Note that some examples are replaced in modern browsers like Chrome and Firefox by an integrated
datepicker.
If you are viewing this demo from a modern browser, I recommend that you take a look at the "Example
Inputs with class configuration" or reopen this page with Internet Explorer.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<button class="back" onclick="history.back()">
Back
</button>
</div>
</div>
<script src="./configurable-date-input-polyfill.dist.js"></script>
</body>
</html>