Add Today button in records for the day

This commit is contained in:
Claudio Ortolina
2025-09-16 22:11:09 +03:00
parent 79fddb0189
commit 01094004ee
@@ -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
</.button>
</:outer_suffix>
</.date_picker>
</.form>
</div>
<div class="bg-white dark:bg-zinc-800 rounded-md shadow-sm">