Form date helper with text year

I have a date where the year range is more then I want to define in a
select_date scaffold generated year range.

My idea was to have the year entered as a text field and the month and
day using something like:

<%= select_month @person.born,:prefix => :person ,:field_name =>
“born(2i)” %>
<%= select_day @person.born,:prefix => :person , :field_name =>
“born(3i)” %>

<%= f.text_field ??? or text_field_tag ??? field_name =>
“born(1i)” %>

I just can’t seem to find the set of options to build the year tag.
Guess I also would have to extract the year out of the date for the

Can’t seem to find any examples and looking for help.

I’ll answer my own question:

    <%= select_month @person.born,:prefix => :person ,:field_name

=> “born(2i)” %>
<%= select_day @person.born,:prefix => :person , :field_name
=> “born(3i)” %>
<%= text_field_tag “person[born(1i)]”, value =
@person.born.year,:size => 4 %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs