This repository has been archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.htm
133 lines (113 loc) · 4.49 KB
/
index.htm
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
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>Sélection d'une période calendaire avec Twitter Bootstrap</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="all" href="daterangepicker-bs3.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="moment-with-langs.min.js"></script>
<script type="text/javascript" src="daterangepicker.js"></script>
<script type="text/javascript">
moment.lang('fr');
var pickerLocale = {
applyLabel: 'OK',
cancelLabel: 'Annuler',
fromLabel: 'Entre',
toLabel: 'et',
customRangeLabel: 'Période personnalisée',
daysOfWeek: moment().lang()._weekdaysMin,
monthNames: moment().lang()._months,
firstDay: 0
};
var pickerRanges = {
'Aujourd\'hui': [moment(), moment()],
'Hier': [moment().subtract('days', 1), moment().subtract('days', 1)],
'5 jours précédents': [moment().subtract('days', 4), moment().subtract('days', 1)],
'Ce mois': [moment().startOf('month'), moment().endOf('month')],
'Mois précedent': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
};
$(document).ready(function() {
$('#periode').daterangepicker(
{
showDropdowns: false,
ranges: pickerRanges,
format: 'DD/MM/YYYY',
separator: ' à ',
locale: pickerLocale
}
);
$('#periode_heure').daterangepicker(
{
startDate: moment().subtract('days', 1),
endDate: moment(),
showDropdowns: false,
showWeekNumbers: true,
timePicker: true,
timePickerIncrement: 1,
timePicker12Hour: false,
ranges: pickerRanges,
format: 'DD/MM/YYYY hh:mm',
separator: ' à ',
locale: pickerLocale
}
);
$('#date_simple').daterangepicker(
{
startDate: moment(),
format: 'DD/MM/YYYY',
singleDatePicker: true,
locale: pickerLocale
}
);
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<h4>Sélection d'une période sans les heures</h4>
<div class="well">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<div class="controls">
<p class="form-control-static">Période: <input type="text" style="width: 200px" name="periode" id="periode" /> </p>
</div>
</div>
</fieldset>
</form>
</div>
<h4>Sélection d'une période AVEC les heures</h4>
<div class="well">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<div class="controls">
<p class="form-control-static">Période: <input type="text" style="width: 300px" name="periode_heure" id="periode_heure" /> </p>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h4>Sélection d'une date unique</h4>
<div class="well">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<div class="controls">
<p class="form-control-static">Date: <input type="text" style="width: 200px" name="date_simple" id="date_simple" /> </p>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</body>
</html>