Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
dangrossman committed Nov 4, 2015
1 parent a7e12eb commit 445fb1f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,28 @@ <h4>Demo:</h4>
</div>
</div>

<script type="text/javascript">
$(function() {

function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
cb(moment().subtract(29, 'days'), moment());

$('#reportrange').daterangepicker({
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')]
}
}, cb);

});
</script>

</div>

<div id="ex5" name="ex5">
Expand Down

0 comments on commit 445fb1f

Please sign in to comment.