From 9764a6ede2c3cf907bd830cd46e5cf863b40b5c2 Mon Sep 17 00:00:00 2001 From: r3ps4J <40723838+r3ps4J@users.noreply.github.com> Date: Thu, 23 May 2024 21:19:25 +0200 Subject: [PATCH] Fix dateAfter filter changing date object hours --- src/app/components/api/filterservice.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/api/filterservice.ts b/src/app/components/api/filterservice.ts index 7d97e0d3d66..bae428d6cc7 100644 --- a/src/app/components/api/filterservice.ts +++ b/src/app/components/api/filterservice.ts @@ -250,9 +250,11 @@ export class FilterService { if (value === undefined || value === null) { return false; } - value.setHours(0, 0, 0, 0); - return value.getTime() > filter.getTime(); + const valueCopy = new Date(value); + valueCopy.setHours(0, 0, 0, 0); + + return valueCopy.getTime() > filter.getTime(); } };