-
Notifications
You must be signed in to change notification settings - Fork 0
/
datetime-picker.html
98 lines (94 loc) · 3.84 KB
/
datetime-picker.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
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/datepicker.css">
<link rel="stylesheet" href="css/bootstrap-timepicker.css">
</head>
<body>
<div class="hero-unit"><h1>DateTime Picker</h1>
<form action=".">
<h4>Year Picker</h4>
<div id="datetime-picker0"></div>
<span class="help-inline">format: <strong>YYYY-XX-XX</strong></span>
<h4>Month Picker</h4>
<div id="datetime-picker1"></div>
<span class="help-inline">format: <strong>YYYY-??-XX</strong></span>
<h4>Day Picker</h4>
<div id="datetime-picker2"></div>
<span class="help-inline">format: <strong>YYYY-MM-??, month is required</strong></span>
<h4>Day Picker</h4>
<div id="datetime-picker3"></div>
<span class="help-inline">format: <strong>YYYY-MM-DD, day and month are required</strong></span>
<h4>Hour Picker</h4>
<div id="datetime-picker4"></div>
<span class="help-inline">format: <strong>HH:XX:XX</strong> hour is required</span>
<h4>Hour-Minute-Second Picker</h4>
<div id="datetime-picker5"></div>
<span class="help-inline">format: <strong>HH:MM:SS.sss</strong> everything is required</span>
<h4>Full picker</h4>
<div id="datetime-picker6"></div>
<span class="help-inline">format: <strong>YYYY-MM-DDTHH:MM:SS.sss</strong> everything is required</span>
</form>
</div>
<script src="js/vendor/jquery-1.9.0.js"></script>
<script src="js/vendor/bootstrap.js"></script>
<script src="js/vendor/underscore.js"></script>
<script src="js/vendor/backbone.js"></script>
<script src="js/vendor/rivets.js"></script>
<script src="js/vendor/handlebars.js"></script>
<script src="js/vendor/jquery.blockUI.js"></script>
<script src="js/vendor/moment.js"></script>
<script src="js/vendor/bootstrap-datepicker.js"></script>
<script src="js/vendor/bootstrap-timepicker.js"></script>
<!--Application-->
<script src="js/siberianehr.js"></script>
<script src="js/templates/datetimepicker-tmpl.js"></script>
<script src="js/datetimepicker.js"></script>
<!--Example code-->
<script type="text/javascript">
$(function(){
$('#datetime-picker0').dateTimePicker({
format: 'YYYY-XX-XXTXX:XX:XX',
localDateFormat: 'DD-MM-YYYY',
Magnitude: 63494389149.55
});
$('#datetime-picker1').dateTimePicker({
format: 'YYYY-??-XXTXX:XX:XX',
localDateFormat: 'DD-MM-YYYY',
Magnitude: 63494389149.55
});
$('#datetime-picker2').dateTimePicker({
format: 'YYYY-MM-??TXX:XX:XX',
localDateFormat: 'DD-MM-YYYY',
Magnitude: 63494389149.55
});
$('#datetime-picker3').dateTimePicker({
format: 'YYYY-MM-DDTXX:XX:XX',
Value: '2013-01-21'
});
$('#datetime-picker4').dateTimePicker({
format: 'XXXX-XX-XXTHH:XX:XX',
Value: '2013-01-21T18:05:12'
});
$('#datetime-picker5').dateTimePicker({
format: 'XXXX-XX-XXTHH:MM:SS.sss',
Value: '0001-01-01T01:23:45.678'
});
$('#datetime-picker6').dateTimePicker({
format: 'YYYY-MM-DDTHH:MM:SS.sss',
Value: '2013-04-21T01:23:45.678'
});
});
</script>
</body>
</html>