1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-03 12:35:21 +02:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 4 deletions

View file

@ -86,7 +86,7 @@
<%= label_tag :add_start_values, t(".optional_start_balance_message"), class: "pl-1 text-sm text-gray-500" %>
<div class="hidden peer-checked:flex items-center gap-2 mt-3 mb-6">
<div class="w-1/2"><%= f.date_field :start_date, label: t(".start_date"), max: Date.yesterday %></div>
<div class="w-1/2"><%= f.date_field :start_date, label: t(".start_date"), max: Date.yesterday, min: Account::Entry.min_supported_date %></div>
<div class="w-1/2"><%= f.number_field :start_balance, label: t(".start_balance") %></div>
</div>
</div>