forked from github/plane
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:
parent
fb01e6d22c
commit
06fb3e9b58
@ -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" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user