From b5edbc724cbebb44d54ee508752cb2101a356a3d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 3 Dec 2015 00:35:20 -0800 Subject: Fix transaction date filter --- public/js/report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/js/report.js') diff --git a/public/js/report.js b/public/js/report.js index cc20c86a..3a29d788 100644 --- a/public/js/report.js +++ b/public/js/report.js @@ -46,7 +46,7 @@ to = moment($('#to_date').val(), "MM/DD/YYYY"); d = moment(e.date); amount = parseFloat(e.exchange) * parseFloat(e.received); - return !isNaN(parseFloat(amount)) && isFinite(amount) && ((from == null) || d.diff(from) >= 0) && ((to == null) || d.diff(to) <= 0); + return !isNaN(parseFloat(amount)) && isFinite(amount) && ((from == null) || d.diff(from, 'days') >= 0) && ((to == null) || d.diff(to, 'days') <= 0); }); return display(transactions); }; -- cgit v1.2.3