From 06fb3e9b586984652b7439dc0fab0e3e3f9b8c3f Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:09:11 +0530 Subject: [PATCH] fix: calendar view bugs (#600) * fix: text turncate added for issue * fix: next week btn fix, style:calendar cell height fix --- apps/app/components/core/calendar-view/calendar.tsx | 4 ++-- apps/app/helpers/calendar.helper.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/app/components/core/calendar-view/calendar.tsx b/apps/app/components/core/calendar-view/calendar.tsx index c61236edb..a8fed31cc 100644 --- a/apps/app/components/core/calendar-view/calendar.tsx +++ b/apps/app/components/core/calendar-view/calendar.tsx @@ -362,7 +362,7 @@ export const CalendarView = () => {
@@ -393,7 +393,7 @@ export const CalendarView = () => { ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps} - className={`w-full cursor-pointer rounded bg-white p-1.5 hover:scale-105 ${ + className={`w-full cursor-pointer truncate rounded bg-white p-1.5 hover:scale-105 ${ snapshot.isDragging ? "shadow-lg" : "" }`} > diff --git a/apps/app/helpers/calendar.helper.ts b/apps/app/helpers/calendar.helper.ts index 436fa237e..ea553e170 100644 --- a/apps/app/helpers/calendar.helper.ts +++ b/apps/app/helpers/calendar.helper.ts @@ -149,13 +149,13 @@ export const isSameYear = (yearString: string, date: Date) => { }; export const addSevenDaysToDate = (date: Date) => { - const currentDate = date; + const currentDate = new Date(date); const newDate = new Date(currentDate.setDate(currentDate.getDate() + 7)); return newDate; }; export const subtract7DaysToDate = (date: Date) => { - const currentDate = date; + const currentDate = new Date(date); const newDate = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000); return newDate; };