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.
73b9181f85859ef89a82a3b58ef799a0?d=identicon&s=25 Fabio Vitale (fabvit)
on 2006-05-24 17: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?
4108c0021c64d188494cae8dcfc95fd8?d=identicon&s=25 Jon Mr (jon-d)
on 2006-05-24 17: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.
119af50160cabfe1fb6f2f05f5018c64?d=identicon&s=25 James Ludlow (Guest)
on 2006-05-24 17:42
(Received via mailing list)
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/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.