From fb291c5411f9e7a4d4e140f8482d13fc29e765e1 Mon Sep 17 00:00:00 2001 From: ajnart Date: Tue, 7 Jun 2022 19:34:24 +0200 Subject: [PATCH] :bug: Trying to fix dates --- src/components/modules/calendar/CalendarModule.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/modules/calendar/CalendarModule.tsx b/src/components/modules/calendar/CalendarModule.tsx index 211108463..4f3c9e492 100644 --- a/src/components/modules/calendar/CalendarModule.tsx +++ b/src/components/modules/calendar/CalendarModule.tsx @@ -111,27 +111,27 @@ function DayComponent(props: any) { props; const [opened, setOpened] = useState(false); - const day = renderdate.getDate(); + const day = renderdate.toDateString(); const readarrFiltered = readarrmedias.filter((media: any) => { const date = new Date(media.releaseDate); - return date.getDate() === day && date.getMonth() === renderdate.getMonth(); + return date.toDateString() === day; }); const lidarrFiltered = lidarrmedias.filter((media: any) => { const date = new Date(media.releaseDate); // Return true if the date is renerdate without counting hours and minutes - return date.getDate() === day && date.getMonth() === renderdate.getMonth(); + return date.toDateString() === day; }); const sonarrFiltered = sonarrmedias.filter((media: any) => { const date = new Date(media.airDate); // Return true if the date is renerdate without counting hours and minutes - return date.getDate() === day && date.getMonth() === renderdate.getMonth(); + return date.toDateString() === day; }); const radarrFiltered = radarrmedias.filter((media: any) => { const date = new Date(media.inCinemas); // Return true if the date is renerdate without counting hours and minutes - return date.getDate() === day && date.getMonth() === renderdate.getMonth(); + return date.toDateString() === day; }); if ( sonarrFiltered.length === 0 &&