I want to use the phoenix date_select with only year. I managed to do this via builder as shown below.
<%= date_select f, :founding_date, builder: fn b -> %>
<%= b.(:year,
class: input_class,
options: 1900..DateTime.utc_now().year
) %>
<% end %>
However, in my schema I have defined the field like this,
field :statement_year, :date
So when only the year is there, ecto complains with the following error because month and day is missing
unrecognized date %{"year" => "2024"}
Is there a workaround for this?