Skip to content

Commit ea2980f

Browse files
authored
change date options (#824)
1 parent 2cddc7a commit ea2980f

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

app/views/facilitators/_form.html.erb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,22 @@
1515

1616
<div class="flex flex-col md:flex-row gap-4">
1717
<%= f.input :date_of_birth,
18-
as: :string,
18+
as: :date,
19+
discard_year: true,
20+
order: [:month, :day],
1921
input_html: {
20-
type: "date",
2122
class: "w-full rounded-md border-gray-300 shadow-sm
2223
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:ring-opacity-50"
23-
} %>
24+
} %>
2425
<% if current_user.super_user? %>
2526
<%= f.input :member_since,
26-
as: :string,
27+
as: :date,
28+
discard_day: true,
29+
start_year: 1991,
30+
end_year: Time.current.year,
31+
order: [:month, :year],
2732
label: "Facilitator since",
28-
hint: "Pick Jan 1 if you only know the year",
33+
hint: "Pick Jan if you only know the year",
2934
input_html: {
3035
type: "date",
3136
class: "w-full rounded-md border-gray-300 shadow-sm admin-only bg-blue-100 border-blue-200

0 commit comments

Comments
 (0)