1<div class="container">
2 <div class="row">
3 <div class='col-sm-6'>
4 <div class="form-group">
5 <div class='input-group date' id='datetimepicker1'>
6 <input type='text' class="form-control" />
7 <span class="input-group-addon">
8 <span class="glyphicon glyphicon-calendar"></span>
9 </span>
10 </div>
11 </div>
12 </div>
13 <script type="text/javascript">
14 $(function () {
15 $('#datetimepicker1').datetimepicker();
16 });
17 </script>
18 </div>
19</div>
20
1<div class="container">
2 <div class="row">
3 <div class='col-sm-6'>
4 <div class="form-group">
5 <div class='input-group date' id='datetimepicker2'>
6 <input type='text' class="form-control" />
7 <span class="input-group-addon">
8 <span class="glyphicon glyphicon-calendar"></span>
9 </span>
10 </div>
11 </div>
12 </div>
13 <script type="text/javascript">
14 $(function () {
15 $('#datetimepicker2').datetimepicker({
16 locale: 'ru'
17 });
18 });
19 </script>
20 </div>
21</div>
22
1<div class="container">
2 <div class="row">
3 <div class='col-sm-6'>
4 <div class="form-group">
5 <div class='input-group date' id='datetimepicker1'>
6 <input type='text' class="form-control" />
7 <span class="input-group-addon">
8 <span class="glyphicon glyphicon-calendar"></span>
9 </span>
10 </div>
11 </div>
12 </div>
13 <script type="text/javascript">
14 $(function () {
15 $('#datetimepicker1').datetimepicker();
16 });
17 </script>
18 </div>
19</div>
20
1$('#daterange').daterangepicker({
2 locale: { cancelLabel: 'Clear' }
3});
4
5$('#daterange').on('cancel.daterangepicker', function(ev, picker) {
6 //do something, like clearing an input
7 $('#daterange').val('');
8});
9
10
11$('#daterange').daterangepicker();
12$('#daterange').on('apply.daterangepicker', function(ev, picker) {
13 console.log(picker.startDate.format('YYYY-MM-DD'));
14 console.log(picker.endDate.format('YYYY-MM-DD'));
15});