source: public/assets/js/examples/datepicker.js@ 4952f8e

develop
Last change on this file since 4952f8e was 194a359, checked in by beratkjufliju <kufliju@…>, 3 years ago

added departments, edited users and added user settings

  • Property mode set to 100644
File size: 1.4 KB
Line 
1'use strict';
2$(document).ready(function () {
3
4 $('input[name="single-date-picker"]').daterangepicker({
5 singleDatePicker: true,
6 showDropdowns: true
7 });
8
9 $('input[name="simple-date-range-picker"]').daterangepicker();
10
11 $('input[name="simple-date-range-picker-callback"]').daterangepicker({
12 opens: 'left'
13 }, function (start, end, label) {
14 swal("A new date selection was made", start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'), "success")
15 });
16
17 $('input[name="datetimes"]').daterangepicker({
18 timePicker: true,
19 startDate: moment().startOf('hour'),
20 endDate: moment().startOf('hour').add(32, 'hour'),
21 locale: {
22 format: 'M/DD hh:mm A'
23 }
24 });
25
26 /**
27 * datefilter
28 */
29 var datefilter = $('input[name="datefilter"]');
30 datefilter.daterangepicker({
31 autoUpdateInput: false,
32 locale: {
33 cancelLabel: 'Clear'
34 }
35 });
36
37 datefilter.on('apply.daterangepicker', function(ev, picker) {
38 $(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
39 });
40
41 $('input.create-event-datepicker').daterangepicker({
42 singleDatePicker: true,
43 showDropdowns: true,
44 autoUpdateInput: false
45 }).on('apply.daterangepicker', function(ev, picker) {
46 $(this).val(picker.startDate.format('MM/DD/YYYY'));
47 });
48
49});
Note: See TracBrowser for help on using the repository browser.