/home/mip/mip/app/Modules/Client/Views/reports/audittrail/includes/js.blade.php
<script type="text/javascript">
$(document).ready(function(){
$('#reportrange').daterangepicker(
{
startDate: moment().startOf('week'),
endDate: moment().endOf('week'),
showDropdowns: true,
ranges: {
'This Week': [moment().startOf('week'), moment().endOf('week')],
'Last Week': [moment().subtract(1, 'week').startOf('week'), moment().subtract(1, 'week').endOf('week')],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'This Year': [moment().startOf('year'), moment().endOf('year')],
'Last Year': [moment().subtract(1, 'year').startOf('year'), moment().subtract(1, 'year').endOf('year')]
},
},
function(start, end) {
$('#start').val(start.format('YYYY-MM-DD'));
$('#end').val(end.format('YYYY-MM-DD'));
}
);
$('#start').val(moment().startOf('week').format('YYYY-MM-DD'));
$('#end').val(moment().endOf('week').format('YYYY-MM-DD'));
});
</script>