fabio vitale
2006-May-24 15:20 UTC
[Rails] Only years from 2001 to 2011 are available in a date field
When I try to edit a date field in the drop down list I have only years from 2001 to 2011: how can I add an arbitrary year that is NOT included in this list? -- Posted via http://www.ruby-forum.com/.
Jon Mr
2006-May-24 15:25 UTC
[Rails] Re: Only years from 2001 to 2011 are available in a date fie
The default is to have 5 years before and after the current year. there is a way you can extend it. try reading chapter 17 in the agile web development book. -- Posted via http://www.ruby-forum.com/.
James Ludlow
2006-May-24 15:40 UTC
[Rails] Only years from 2001 to 2011 are available in a date field
On 5/24/06, fabio vitale <fabio@sferaconsulting.it> wrote:> When I try to edit a date field in the drop down list I have only years > from 2001 to 2011: how can I add an arbitrary year that is NOT included > in this list?http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M000479 Look at the options for select_year, specifically :start_year and :end_year. select_date will accept these as well. -- James