SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Wednesday, June 18, 2008

default month or day in date_select field

ActionView::Helpers::DateHelper


In my application i am using rails 2.1.0 & oracle db.after creating the scaffold the date field shows year starting from 2003 to 2013.But i need the year field from 1960 onwards,so i manullay write my date_select tag as

<%= f.date_select :Dateofbirth,:start_year=>1960 %>

if we want the end year we add :end_year