diff options
| -rw-r--r-- | public/js/report.coffee | 2 | ||||
| -rw-r--r-- | public/js/report.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/public/js/report.coffee b/public/js/report.coffee index bd449a43..0478a197 100644 --- a/public/js/report.coffee +++ b/public/js/report.coffee @@ -39,7 +39,7 @@ filterDates = -> amount = parseFloat(e.exchange) * parseFloat(e.received) !isNaN(parseFloat(amount)) && isFinite(amount) && - (!from? || d.diff(from) >= 0) && (!to? || d.diff(to) <= 0) + (!from? || d.diff(from, 'days') >= 0) && (!to? || d.diff(to, 'days') <= 0) ) display(transactions) 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); }; |
