source: public/assets/js/examples/pages/ecommerce-dashboard.js@ b6e0879

develop
Last change on this file since b6e0879 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.0 KB
Line 
1$(function () {
2 $('#recent-orders').DataTable({
3 lengthMenu: [5, 10],
4 "columnDefs": [{
5 "targets": 6,
6 "orderable": false
7 }]
8 });
9
10 var start = moment().subtract(29, 'days');
11 var end = moment();
12
13 function cb(start, end) {
14 $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
15 }
16
17 $('#reportrange').daterangepicker({
18 startDate: start,
19 endDate: end,
20 opens: 'left',
21 ranges: {
22 'Today': [moment(), moment()],
23 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
24 'Last 7 Days': [moment().subtract(6, 'days'), moment()],
25 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
26 'This Month': [moment().startOf('month'), moment().endOf('month')],
27 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
28 }
29 }, cb);
30
31 cb(start, end);
32});
Note: See TracBrowser for help on using the repository browser.