forked from chemerisuk/better-dateinput-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (71 loc) · 2.44 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>better-dateinput-polyfill demo</title>
<style>
body {
background: #EFEFEF;
overflow: hidden;
}
body, input {
font-family: sans-serif;
font-size: 1em;
}
.test-form {
margin: 3em;
width: 20em;
}
.test-form input[type=text],
.test-form input[type=date] {
padding: 0.5em;
border: 2px solid #555;
margin: 0;
vertical-align: baseline;
width: 10em;
}
.test-form input[name=start] {
text-align: center;
background: yellow;
}
</style>
</head>
<body>
<form class="test-form">
<p>
<label>Your name<br></label>
<input type="text" required name="name" placeholder="Dart Vaider">
</p>
<p>
<label>Start date<br></label>
<input type="date" name="start" required value="2000-01-01" placeholder="Party begins" data-polyfill="desktop">
</p>
<p>
<label>End date<br></label>
<input type="date" name="end" placeholder="Party ends" min="2014-11-01" max="2016-01-15" data-format="'Ends at' MMM dd yyyy">
</p>
<p>
<label>This field is disabled<br></label>
<input type="date" data-polyfill="none" disabled>
</p>
<p>
<label>This field is readonly<br></label>
<input type="date" data-polyfill="all" readonly value="2012-01-01" >
</p>
<p>
<label>This field is hidden<br></label>
<input type="date" data-polyfill="all" data-format='{"month":"short","year":"numeric","day":"numeric"}' placeholder="Force starts" style="display:none;background:blue;color:white"><button type="button" onclick="this.style.display='none';this.previousSibling.style.display=''">Show dateinput</button>
</p>
<p>
<input type="checkbox" name="accept" required/>
<label>I accept site rules</label>
</p>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
</form>
<script src="bower_components/better-dom/dist/better-dom.js"></script>
<script src="build/better-dateinput-polyfill.js"></script>
</body>
</html>