diff --git a/CHANGELOG.md b/CHANGELOG.md index 9262bfa..928d0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix ammo type counts not showing when count is 0 - Add prompt to create first container before first ammo group - Edit and delete shot groups from ammo group show page +- Use today's date when adding new shot groups # v0.2.3 - Fix modals with overflowing forms diff --git a/lib/cannery_web/components/add_shot_group_component.html.heex b/lib/cannery_web/components/add_shot_group_component.html.heex index a1b1603..79fa8b3 100644 --- a/lib/cannery_web/components/add_shot_group_component.html.heex +++ b/lib/cannery_web/components/add_shot_group_component.html.heex @@ -36,7 +36,11 @@ <%= error_tag(f, :notes, "col-span-3") %> <%= label(f, :date, gettext("Date (UTC)"), class: "title text-lg text-primary-600") %> - <%= date_input(f, :date, class: "input input-primary col-span-2") %> + <%= date_input(f, :date, + class: "input input-primary col-span-2", + phx_update: "ignore", + value: Date.utc_today() + ) %> <%= error_tag(f, :notes, "col-span-3") %> <%= submit(dgettext("actions", "Save"), diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot index 5f4c0cc..5557e58 100644 --- a/priv/gettext/actions.pot +++ b/priv/gettext/actions.pot @@ -124,7 +124,7 @@ msgid "Reset password" msgstr "" #, elixir-autogen, elixir-format -#: lib/cannery_web/components/add_shot_group_component.html.heex:42 +#: lib/cannery_web/components/add_shot_group_component.html.heex:46 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:54 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:156 #: lib/cannery_web/live/container_live/form_component.html.heex:50 diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index a159265..62f6964 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -159,7 +159,7 @@ msgid "Register to setup %{name}" msgstr "" #, elixir-autogen, elixir-format -#: lib/cannery_web/components/add_shot_group_component.html.heex:44 +#: lib/cannery_web/components/add_shot_group_component.html.heex:48 #: lib/cannery_web/live/ammo_group_live/form_component.html.heex:55 #: lib/cannery_web/live/ammo_type_live/form_component.html.heex:157 #: lib/cannery_web/live/container_live/form_component.html.heex:52