From 01094004eee403adc721f26ca4c8e6611800a94c Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 16 Sep 2025 22:11:09 +0300 Subject: [PATCH] Add Today button in records for the day --- .../live/stats_live/index.html.heex | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/music_library_web/live/stats_live/index.html.heex b/lib/music_library_web/live/stats_live/index.html.heex index 371fdd15..f7fb1558 100644 --- a/lib/music_library_web/live/stats_live/index.html.heex +++ b/lib/music_library_web/live/stats_live/index.html.heex @@ -477,7 +477,19 @@ for={to_form(%{"current_date" => @current_date})} phx-change="set_current_date" > - <.date_picker size="xs" field={f[:current_date]} /> + <.date_picker size="xs" field={f[:current_date]}> + <:outer_suffix> + <.button + size="xs" + type="button" + phx-click={ + JS.push("set_current_date", value: %{"current_date" => Date.utc_today()}) + } + > + Today + + +