Last active
August 29, 2015 14:16
-
-
Save dangrossman/a6934f9b09871ca91956 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('input[name="daterange"]').daterangepicker( | |
| { | |
| format: 'YYYY-MM-DD', | |
| startDate: '2013-01-01', | |
| endDate: '2013-12-31', | |
| ranges: { | |
| 'Today': [moment(), moment()], | |
| 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], | |
| 'Last 7 Days': [moment().subtract(6, 'days'), moment()], | |
| 'Last 30 Days': [moment().subtract(29, 'days'), moment()], | |
| 'This Month': [moment().startOf('month'), moment().endOf('month')], | |
| 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] | |
| } | |
| }, | |
| function(start, end, label) { | |
| alert("A new date range was chosen: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD')); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment