fix: calendar view bugs (#600)

* fix: text turncate added for issue

* fix: next week btn fix, style:calendar cell height fix
This commit is contained in:
Anmol Singh Bhatia 2023-03-30 12:09:11 +05:30 committed by GitHub
parent fb01e6d22c
commit 06fb3e9b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -362,7 +362,7 @@ export const CalendarView = () => {
</div> </div>
<div <div
className={`grid h-full auto-rows-[minmax(170px,1fr)] ${ className={`grid h-full auto-rows-[minmax(150px,1fr)] ${
showWeekEnds ? "grid-cols-7" : "grid-cols-5" showWeekEnds ? "grid-cols-7" : "grid-cols-5"
} `} } `}
> >
@ -393,7 +393,7 @@ export const CalendarView = () => {
ref={provided.innerRef} ref={provided.innerRef}
{...provided.draggableProps} {...provided.draggableProps}
{...provided.dragHandleProps} {...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" : "" snapshot.isDragging ? "shadow-lg" : ""
}`} }`}
> >

View File

@ -149,13 +149,13 @@ export const isSameYear = (yearString: string, date: Date) => {
}; };
export const addSevenDaysToDate = (date: Date) => { export const addSevenDaysToDate = (date: Date) => {
const currentDate = date; const currentDate = new Date(date);
const newDate = new Date(currentDate.setDate(currentDate.getDate() + 7)); const newDate = new Date(currentDate.setDate(currentDate.getDate() + 7));
return newDate; return newDate;
}; };
export const subtract7DaysToDate = (date: Date) => { export const subtract7DaysToDate = (date: Date) => {
const currentDate = date; const currentDate = new Date(date);
const newDate = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000); const newDate = new Date(currentDate.getTime() - 7 * 24 * 60 * 60 * 1000);
return newDate; return newDate;
}; };