-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Date filter added income, expense, banking
- Loading branch information
1 parent
2f4911d
commit a355f56
Showing
15 changed files
with
204 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
<div class="input-group"> | ||
<button type="button" class="btn btn-default pull-right" id="daterange-btn"> | ||
<span> | ||
<i class="fa fa-calendar"></i> Date range picker | ||
</span> | ||
<i class="fa fa-caret-down"></i> | ||
</button> | ||
</div> | ||
<button type="button" class="btn btn-sm btn-default btn-filter date-range-btn"> | ||
<span> | ||
<i class="fa fa-{{ $icon }}"></i> {{ $text }} | ||
</span> | ||
<i class="fa fa-caret-down"></i> | ||
{!! Form::hidden($name, null, []) !!} | ||
</button> | ||
|
||
<script> | ||
$(function () { | ||
$('#daterange-btn').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')] | ||
}, | ||
startDate: moment().subtract(29, 'days'), | ||
endDate : moment() | ||
@push('scripts') | ||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
$('.date-range-btn').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')] | ||
}, | ||
function (start, end) { | ||
$('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')) | ||
} | ||
) | ||
}) | ||
</script> | ||
startDate: moment().subtract(29, 'days'), | ||
endDate : moment() | ||
}, | ||
function (start, end) { | ||
$('input[name={{ $name }}]').val(start.format('YYYY-MM-DD') + '_' + end.format('YYYY-MM-DD')); | ||
date_format = convertDateFormat('{{ setting('general.date_format') }}', ' '); | ||
$('.date-range-btn span').html(start.format(date_format) + ' - ' + end.format(date_format)); | ||
} | ||
); | ||
@if(request($name)) | ||
var setDate = '{{ request($name) }}'; | ||
var setDates = setDate.split('_'); | ||
date_format = convertDateFormat('{{ setting('general.date_format') }}', ' '); | ||
start_date = moment(setDates[0], 'YYYY-MM-DD'); //new Date(setDates[0]); | ||
finish_date = moment(setDates[1], 'YYYY-MM-DD'); //new Date(setDates[1]); | ||
$('.date-range-btn span').html(start_date.format(date_format) + ' - ' + finish_date.format(date_format)); | ||
@endif | ||
}); | ||
</script> | ||
@endpush |