-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (44 loc) · 1.47 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
<!doctype html>
<html>
<head>
<title>User Agent Example</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker3.min.css" />
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="date">From:</label>
<input type="text" id="date" class="form-control" data-provide="datepicker" />
</div>
<div class="form-group">
<label for="to">To:</label>
<input type="text" id="to" class="form-control" data-provide="datepicker" />
</div>
</div>
</div>
</div>
<script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript">
$(function() {
var ids = new Array();
if (navigator.userAgent.match(/Mobi/)) {
$('[data-provide="datepicker"]').each(function() {
ids.push($(this).attr("id"));
});
}
var idCount = ids.length;
if (idCount > 0) {
for (var i = 0; i < idCount; i++) {
$('#' + ids[i]).attr('type', 'date');
$('#' + ids[i]).removeAttr('data-provide');
}
}
});
</script>
</body>
</html>