A local-first personal finance app
Fix calendar interaction when editing reports dashboard (#4336)
ChickenSaysBakc883e71e4910
diff --git a/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsxindex 2cb68b565e..6918939ebb 100644--- a/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx+++ b/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx@@ -31,12 +31,14 @@ type CalendarGraphProps = {}[];start: Date;firstDayOfWeekIdx?: SyncedPrefs['firstDayOfWeekIdx'];+ isEditing?: boolean;onDayClick: (date: Date | null) => void;};export function CalendarGraph({data,start,firstDayOfWeekIdx,+ isEditing,onDayClick,}: CalendarGraphProps) {const startingDate = startOfWeek(new Date(), {@@ -97,6 +99,7 @@ export function CalendarGraph({gap: 2,width: '100%',height: '100%',+ zIndex: isEditing ? -1 : 'auto', // Prevents interaction with calendar buttons when editing dashboard.}}>{data.map((day, index) =>diff --git a/packages/desktop-client/src/components/reports/reports/CalendarCard.tsx b/packages/desktop-client/src/components/reports/reports/CalendarCard.tsxindex c49d07af18..59e6994af2 100644--- a/packages/desktop-client/src/components/reports/reports/CalendarCard.tsx+++ b/packages/desktop-client/src/components/reports/reports/CalendarCard.tsx@@ -302,6 +302,7 @@ export function CalendarCard({selectedMonthNameFormat={selectedMonthNameFormat}index={index}widgetId={widgetId}+ isEditing={isEditing}/>))) : (@@ -327,6 +328,7 @@ type CalendarCardInnerProps = {selectedMonthNameFormat: string;index: number;widgetId: string;+ isEditing?: boolean;};function CalendarCardInner({calendar,@@ -335,6 +337,7 @@ function CalendarCardInner({selectedMonthNameFormat,index,widgetId,+ isEditing,}: CalendarCardInnerProps) {const [monthNameVisible, setMonthNameVisible] = useState(true);const monthFormatSizeContainers = useRef<(HTMLSpanElement | null)[]>(@@ -513,6 +516,7 @@ function CalendarCardInner({data={calendar.data}start={calendar.start}firstDayOfWeekIdx={firstDayOfWeekIdx}+ isEditing={isEditing}onDayClick={date => {if (date) {navigate(diff --git a/upcoming-release-notes/4336.md b/upcoming-release-notes/4336.mdnew file mode 100644index 0000000000..9f60d355b3--- /dev/null+++ b/upcoming-release-notes/4336.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [ChickenSaysBak]+---++Fix calendar interaction when editing reports dashboard