forked from t1m0n/air-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
visual-tests.html
112 lines (107 loc) · 4.37 KB
/
visual-tests.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Air datepicker visual tests</title>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="dist/js/datepicker.js"></script>
<link rel="stylesheet" href="dist/css/datepicker.css"/>
<link rel="stylesheet" href="docs/css/style.css"/>
<script type="text/javascript">
var log;
function logger (el) {
var $el = $(el);
return function(text) {
var count = $('p', $el).length;
$el.append('<p><span>' + count++ + '.</span> ' + text + '</p>').scrollTop(100000)
}
}
$(function () {
log = logger('#v-log');
})
</script>
</head>
<body>
<div class="v-log" id="v-log"></div>
<div class="visual-tests">
<article>
<h1>Basic</h1>
<div class="row">
<div class="vt-tile">
<h2>Default</h2>
<div class="datepicker-here"></div>
</div>
</div>
</article>
<article>
<h1>Range</h1>
<div class="row">
<div class="vt-tile">
<h2>{range: true}</h2>
<div class="datepicker-here" data-range="true"></div>
</div>
<div class="vt-tile">
<h2>{range: true, onSelect: ...}</h2>
<div class="datepicker-here" id="dp-3" data-range="true"></div>
<script type="text/javascript">
$('#dp-3').datepicker({
onSelect: function (fd) {
log(fd)
}
})
</script>
</div>
<div class="vt-tile">
<h2>{range: true, onSelect: ...}</h2>
<input class="datepicker-here" id="dp-4" data-range="true"/>
<script type="text/javascript">
$('#dp-4').datepicker({
onSelect: function (fd) {
log(fd)
}
})
</script>
</div>
</div>
</article>
<article>
<h1>Timepicker</h1>
<div class="row">
<div class="vt-tile">
<h2>{timepicker: true}</h2>
<div class="datepicker-here" data-timepicker="true"></div>
</div>
<div class="vt-tile">
<h2>{onChange: ..., toggleSelected: false, range: true}</h2>
<input id="dp-5" class="datepicker-here" data-timepicker="true" />
<script type="text/javascript">
$('#dp-5').datepicker({
toggleSelected: false,
inline: true,
range: true,
onSelect: function (fd) {
log(fd)
}
})
</script>
</div>
<div class="vt-tile">
<h2>{timepicker: true}</h2>
<input class="datepicker-here" data-timepicker="true" />
</div>
<div class="vt-tile">
<h2>{timepicker: true, minDate: new Date()}</h2>
<input class="datepicker-here" id="dp-6"/>
<script type="text/javascript">
$('#dp-6').datepicker({
minDate: new Date(),
inline: true,
timepicker: true
})
</script>
</div>
</div>
</article>
</div>
</body>
</html>