forked from jcgertig/date-input-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
61 lines (51 loc) · 1.22 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
<!DOCTYPE html>
<html style="height: 100%; width: 100%">
<head>
<meta charset="UTF-8">
<title>Polyfill Test</title>
<meta name="description" content="Polyfill Test">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
</head>
<body>
<p>
normal:
<input type="date" />
<script>
var theDate = document.querySelector('input[type="date"]');
theDate.addEventListener('change', function() {
});
</script>
</p>
<p>
SK:
<input type="date" lang="sk" value="2015-03-28"/>
</p>
<p>
CZ:
<input type="date" lang="cz" value="2015-03-28"/>
</p>
<p>
with format ("date-format"):
<input type="date" date-format="mm/dd/yyyy" />
</p>
<p>
with format ("data-date-format"):
<input type="date" data-date-format="mm/dd/yyyy" />
</p>
<p>
text class with format:
<input class="date-polyfill" type="text" date-format="mm/dd/yyyy" />
</p>
<p id="dynamic">
dynamically created:
<script>
setTimeout(function() {
var input = document.createElement("input");
input.setAttribute("type", "date");
document.getElementById("dynamic").appendChild(input);
}, 2000);
</script>
</p>
<script src="date-input-polyfill.dist.js"></script>
</body>
</html>