diff --git a/Timeline Widget/1_render.html/script.js b/Timeline Widget/1_render.html/script.js
index 52668c0..9fd52b1 100644
--- a/Timeline Widget/1_render.html/script.js
+++ b/Timeline Widget/1_render.html/script.js
@@ -145,6 +145,24 @@ async function renderTimeline() {
// Add present time marker based on "timeline_present" label
timeline.setCurrentTime(timeline_options.timeline_present);
+ // Add event listener to activate a day note on click
+ timeline.on("click", async (e) => {
+ const timelineHeight = timeline.dom.centerContainer.getBoundingClientRect().height;
+ if (e.y <= timelineHeight) {
+ // ignore clicks on the timeline
+ return;
+ }
+ const effectiveY = e.y - timelineHeight;
+ if (effectiveY > timeline.dom.bottom.children[0].children[0].getBoundingClientRect().height) {
+ // ignore clicks on the month axis
+ return;
+ }
+ const day = e.time.toISOString().substr(0, 10);
+ const todayNote = await api.getDayNote(day);
+ api.waitUntilSynced();
+ await api.openTabWithNote(todayNote.noteId, true);
+ });
+
// Create UI menu buttons from added groups (that are not forced into another group)
menu.innerHTML = '';
const toggle_groups = groups.get({filter:function(item){return(item.forceGroup===null && item.id!=='default')}});