Forum: Ruby on Rails Only years from 2001 to 2011 are available in a date field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fabio V. (Guest)
on 2006-05-24 19:19
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?
Jon M. (Guest)
on 2006-05-24 19:25
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.
James L. (Guest)
on 2006-05-24 19:42
(Received via mailing list)
On 5/24/06, fabio vitale <removed_email_address@domain.invalid> 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/Help...

Look at the options for select_year, specifically :start_year and
:end_year.  select_date will accept these as well.

-- James
This topic is locked and can not be replied to.