-
Notifications
You must be signed in to change notification settings - Fork 515
/
index.html
211 lines (205 loc) · 5.94 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
<html>
<head>
<title>Bootstrap-Material DateTimePicker</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/material.min.css" />
<link rel="stylesheet" href="./css/bootstrap-material-datepicker.css" />
<link href='http://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/FezVrasta/bootstrap-material-design/master/dist/js/material.min.js"></script>
<script type="text/javascript" src="http://momentjs.com/downloads/moment-with-locales.min.js"></script>
<script type="text/javascript" src="./js/bootstrap-material-datepicker.js"></script>
<style>
body
{
padding-top: 70px;
font-family: 'Roboto', sans-serif;
}
h2
{
padding: 0 20px 10px 20px;
font-size: 20px;
font-weight: 400;
}
.form-control-wrapper
{
margin: 10px 20px;
}
code
{
padding: 10px;
background: #eee!important;
display: block;
color: #000;
}
code > p
{
font-weight: bold;
color: #000;
font-size: 1.5em;
}
@media(max-width: 300px)
{
.well { margin : 0}
}
</style>
<script>
/*(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-60343429-1', 'auto');
ga('send', 'pageview');*/
</script>
</head>
<body>
<div class="container well">
<div class="row">
<div class="col-md-6">
<h1>Bootstrap Material DatePicker</h1>
</div>
</div>
</div>
<div class="container well">
<div class="row">
<div class="col-md-6">
<h2>Date Picker</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-control-wrapper">
<input type="text" id="date" class="form-control floating-label" placeholder="Date">
</div>
</div>
<div class="col-md-6">
<code>
<p>Code</p>
$('#date').bootstrapMaterialDatePicker({ weekStart : 0, time: false });
</code>
</div>
</div>
</div>
<div class="container well">
<div class="row">
<div class="col-md-6">
<h2>Date Time Picker</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-control-wrapper">
<input type="text" id="date-format" class="form-control floating-label" placeholder="Begin Date Time">
</div>
</div>
<div class="col-md-6">
<code>
<p>Code</p>
$('#date-format').bootstrapMaterialDatePicker({ format : 'dddd DD MMMM YYYY - HH:mm' });
</code>
</div>
</div>
</div>
<div class="container well">
<div class="row">
<div class="col-md-6">
<h2>French Locales (Week starts at Monday)</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-control-wrapper">
<input type="text" id="date-fr" class="form-control floating-label" placeholder="Date de début">
</div>
</div>
<div class="col-md-6">
<code>
<p>Code</p>
$('#date-fr').bootstrapMaterialDatePicker({ format : 'DD/MM/YYYY HH:mm', lang : 'fr', weekStart : 1 });
test
</code>
</div>
</div>
</div>
<div class="container well">
<div class="row">
<div class="col-md-6">
<h2>Events</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<div class="form-control-wrapper">
<input type="text" id="date-start" class="form-control floating-label" placeholder="Start Date">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-control-wrapper">
<input type="text" id="date-end" class="form-control floating-label" placeholder="End Date">
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<code>
<p>Code</p>
$('#date-end').bootstrapMaterialDatePicker({ weekStart : 0 });<br />
$('#date-start').bootstrapMaterialDatePicker({ weekStart : 0 }).on('change', function(e, date)<br />
{<br />
$('#date-end').bootstrapMaterialDatePicker('setMinDate', date);<br />
});
</code>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function()
{
$('#date').bootstrapMaterialDatePicker
({
time: false
});
$('#date-format').bootstrapMaterialDatePicker
({
format: 'dddd DD MMMM YYYY - HH:mm'
});
$('#date-fr').bootstrapMaterialDatePicker
({
format: 'dddd DD MMMM YYYY - HH:mm',
lang: 'fr',
weekStart: 1
});
$('#date-end').bootstrapMaterialDatePicker
({
weekStart: 0, format: 'DD/MM/YYYY HH:mm'
});
$('#date-start').bootstrapMaterialDatePicker
({
weekStart: 0, format: 'DD/MM/YYYY HH:mm'
}).on('change', function(e, date)
{
$('#date-end').bootstrapMaterialDatePicker('setMinDate', date);
});
$.material.init()
});
</script>
</body>
</html>