From 65466fd5c645e546707ce699b4ea289f894fea20 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sat, 9 May 2026 01:14:57 -0700 Subject: Auto-select today's date on add form; clean up rewatch history panel - Default date_watched to today when adding a new film (JS, en-CA locale) - Match rewatch history by tmdb_id when available, fall back to title - Replace inline styles in rewatch section with CSS classes - Simplify redundant Jinja conditions (rewatch_history and, loop.length > 1) - Move review-panel margin-top hack to .review-panel-spaced class Co-Authored-By: Claude Sonnet 4.6 --- static/app.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'static/app.js') diff --git a/static/app.js b/static/app.js index fae2dbd..db3e694 100644 --- a/static/app.js +++ b/static/app.js @@ -1,3 +1,8 @@ +const dateDefault = document.querySelector("[data-default-today]"); +if (dateDefault) { + dateDefault.value = new Date().toLocaleDateString("en-CA"); +} + // Hamburger menu toggle const menuToggle = document.querySelector("#menu-toggle"); const navActions = document.querySelector("#nav-actions"); -- cgit v1.3-2-g0d8e