# Date\_select in a collection

**URL:** <https://www.ruby-forum.com/t/date-select-in-a-collection/125298>\
**Category:** Rails\
**Created:** [January 8, 2008, 1:47am UTC](https://www.ruby-forum.com/t/date-select-in-a-collection/125298 "2008-01-08T01:47:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 8, 2008, 1:47am UTC](https://www.ruby-forum.com/t/date-select-in-a-collection/125298/1 "2008-01-08T01:47:48Z")

</div>

I have a multi model form with a collection of ‘child’ objects. When  
the form gets posed back the children are all nicely in  
child\_attributes but the dates are not. I can see from the HTML that  
the [] of the other fields gets replaced due to the date field already  
being multi parameter.

\<% fields\_for “client[child\_attributes][]”, new\_child do |f| %\>  
\<%= f.text\_field ‘first\_name’, “size” =\> 10 %\>  
DOB: \<%= f.date\_select ‘dob’, :order =\>  
[:month, :day, :year], :start\_year =\> Time.now.year - 15, :end\_year =\>  
Time.now.year %\>  
  
\<% end %\>

Thanks in advance for any assistance.

Hugh
