From 7d9196d5e18daea7085a3347b14b910871727272 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 10 Jul 2025 18:14:23 +0300 Subject: [PATCH] feat(popup_editor): integrate with calendar for day notes --- apps/client/src/widgets/view_widgets/calendar_view.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/view_widgets/calendar_view.ts b/apps/client/src/widgets/view_widgets/calendar_view.ts index 9cb074715..c8f0119f6 100644 --- a/apps/client/src/widgets/view_widgets/calendar_view.ts +++ b/apps/client/src/widgets/view_widgets/calendar_view.ts @@ -225,6 +225,7 @@ export default class CalendarView extends ViewMode<{}> { $(mainContainer ?? e.el).append($(promotedAttributesHtml)); } }, + // Called upon when clicking the day number in the calendar, opens or creates the day note but only if in a calendar root. dateClick: async (e) => { if (!this.isCalendarRoot) { return; @@ -232,7 +233,8 @@ export default class CalendarView extends ViewMode<{}> { const note = await date_notes.getDayNote(e.dateStr); if (note) { - appContext.tabManager.getActiveContext()?.setNote(note.noteId); + appContext.triggerCommand("openInPopup", { noteIdOrPath: note.noteId }); + appContext.triggerCommand("refreshNoteList", { noteId: this.parentNote.noteId }); } }, datesSet: (e) => this.#onDatesSet(e),