develop
Last change
on this file since 9141ace 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:
853 bytes
|
Line | |
---|
1 | $(function () {
|
---|
2 | var start = moment().subtract(29, 'days');
|
---|
3 | var end = moment();
|
---|
4 |
|
---|
5 | function cb(start, end) {
|
---|
6 | $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
---|
7 | }
|
---|
8 |
|
---|
9 | $('#reportrange').daterangepicker({
|
---|
10 | startDate: start,
|
---|
11 | endDate: end,
|
---|
12 | ranges: {
|
---|
13 | 'Today': [moment(), moment()],
|
---|
14 | 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
---|
15 | 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
---|
16 | 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
---|
17 | 'This Month': [moment().startOf('month'), moment().endOf('month')],
|
---|
18 | 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
---|
19 | }
|
---|
20 | }, cb);
|
---|
21 |
|
---|
22 | cb(start, end);
|
---|
23 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.