fix(expenses): refresh table when date range or filters change (#4633)

Restore the daterangepicker apply and filter change handlers so
/expenses/search receives the selected start_date and end_date
instead of today's date for both. Also removes leftover comments
from the expenses manage view.

Fixes #4596

---------

Co-authored-by: jekkos <jeroen.peelaerts@gmail.com>
This commit is contained in:
richardmillesandjekkos authored and GitHub committed 2026-10-05 10:40:29 +04:00
1 parent 2929945d0b
commit 3e68295f95
1 file changed
+8 -2
+8 -2
View File
@@ -14,12 +14,18 @@
<script type="text/javascript">
$(document).ready(function() {
// Load the preset datarange picker
$('#filters').on('hidden.bs.select', function(e) {
table_support.refresh();
});
<?= view('partial/daterangepicker') ?>
$("#daterangepicker").on('apply.daterangepicker', function(ev, picker) {
table_support.refresh();
});
<?= view('partial/bootstrap_tables_locale') ?>
// Override dates from server if provided
<?php if (isset($start_date) && $start_date): ?>
start_date = "<?= esc($start_date) ?>";
<?php endif; ?>