Set minimum supported date for account entries (#1023)

* Set minimum supported date for account entries

* Fix validation proc

* Fix date input in system tests
This commit is contained in:
Zach Gollwitzer
2024-07-26 10:47:27 -04:00
committed by GitHub
parent 701e17829d
commit 76dd5e57fb
6 changed files with 16 additions and 4 deletions

View File

@@ -18,7 +18,7 @@
<%= f.fields_for :entryable do |ef| %>
<%= ef.collection_select :category_id, Current.family.categories.alphabetically, :id, :name, { prompt: t(".category_prompt"), label: t(".category") } %>
<% end %>
<%= f.date_field :date, label: t(".date"), required: true, max: Date.today %>
<%= f.date_field :date, label: t(".date"), required: true, min: Account::Entry.min_supported_date, max: Date.today %>
</section>
<section>