-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (77 loc) · 2.57 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
<!DOCTYPE html>
<html>
<head>
<title>Datepicker test page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="js/libs/datepicker/datepicker.style.css">
<script src="js/libs/datepicker/datepicker.lib.js"></script>
</head>
<body>
<div class='wrapp'>
<h1>Picknic.date</h1>
<h2>Welcome stranger! Let's test that datepicker...</h2>
<div class="content">
<div>
<h3>#1 Params:</h3>
<p>This datepicker has default parameters except viewing range.
Also arrow up and down keys increments/decrements date when are being used in field.
</p>
<pre>
Datepicker.set(".dateField",{
range: "Month",
defaultDate: "today"
});
</pre>
Here is two independent fields:<br>
<input type="text" class="dateField">
<input type="text" class="dateField">
</div>
<div>
<h3>#2 Params:</h3>
<p>Same as previous one. Works independently!</p>
<pre>
Datepicker.set(".yearRanged",{
range: "Year",
dateFormat: "ddmmyyyy",
defaultDate: "20052015"
});
</pre>
<input type="text" class="yearRanged">
</div>
<div>
<h3>#3 Params:</h3>
<p>That one has: other date format (ex: 20, May 2015), datepicker activates by button. First day is Monday.</p>
<pre>
Datepicker.set("#uniqueDatepicker",{
range: "Day",
dateFormat: "dd, MM yyyy",
button: true,
firstDay: "Mon"
});
</pre>
<input type="text" class="dateField" id="uniqueDatepicker">
</div>
</div>
</div>
<div class="konami"><img src="css/konami-code.gif"></div>
</body>
<script type="text/javascript">
Datepicker.set(".dateField",{
range: "Month", // Could be (Day/Month/Year)
defaultDate: "today"
});
Datepicker.set(".yearRanged",{
range: "Year",
dateFormat: "ddmmyyyy",
defaultDate: "20052015"
});
Datepicker.set("#uniqueDatepicker",{
range: "Day",
dateFormat: "dd, MM yyyy", //Could be almost anything you like using (d,m,y,M) ex: (dd-mm-yyyy | d, MM yyyy),
button: true, //Using sibling button or just by focus on field
firstDay: "Mon" //Or "Sun"
});
</script>
</html>