From fbc43284488b24fb87c48c83b9d21032b68da3cc Mon Sep 17 00:00:00 2001 From: Weiko Date: Mon, 15 Sep 2025 18:17:21 +0200 Subject: [PATCH] Add grid to calendar view (#14516) Screenshot 2025-09-15 at 18 15 40 Next step: fix padding issue with cards --- .../components/RecordCalendar.tsx | 2 ++ .../components/RecordCalendarTopBar.tsx | 11 ++++++-- .../month/components/RecordCalendarMonth.tsx | 9 ++++-- .../components/RecordCalendarMonthBody.tsx | 4 ++- .../components/RecordCalendarMonthBodyDay.tsx | 28 +++++++++++++++++-- .../RecordCalendarMonthBodyWeek.tsx | 4 +++ .../RecordCalendarMonthHeaderDay.tsx | 6 +++- 7 files changed, 54 insertions(+), 10 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx index 508b72fb9c..f1404692df 100644 --- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx +++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx @@ -11,6 +11,8 @@ const StyledContainerContainer = styled.div` flex-direction: column; min-height: calc(100% - ${({ theme }) => theme.spacing(2)}); height: min-content; + gap: ${({ theme }) => theme.spacing(2)}; + padding: ${({ theme }) => theme.spacing(3)}; `; export const RecordCalendar = () => { diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx index b866d89d21..a4c1d06579 100644 --- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx +++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx @@ -27,6 +27,10 @@ const StyledContainer = styled.div` width: 100%; `; +const StyledNavigationButton = styled(Button)` + padding: ${({ theme }) => theme.spacing(1)}; +`; + const StyledLeftSection = styled.div` display: flex; align-items: center; @@ -37,6 +41,7 @@ const StyledNavigationSection = styled.div` display: flex; align-items: center; gap: ${({ theme }) => theme.spacing(1)}; + justify-content: flex-end; `; export const RecordCalendarTopBar = () => { @@ -119,6 +124,8 @@ export const RecordCalendarTopBar = () => { isDateTimeInput={false} onChange={handleDateChange} onClose={handleDateChange} + onEnter={handleDateChange} + onEscape={handleDateChange} clearable={false} hideHeaderInput /> @@ -129,7 +136,7 @@ export const RecordCalendarTopBar = () => { -