Hi, Im using radrails and mysql database, im using DATE in mysql for a date of birth column, When i use this in Radrails the date shows as dropdown lists, the days and month are fine but the year list only shows 2002-2012. Is there any way of extending the years? as its not suitable for date of birth. Any help appreciated
on 2007-04-13 00:23
on 2007-04-13 12:23
on 2007-04-13 12:28
It would help if you showed us the code you are using to generate the drop-down list...
on 2007-04-13 12:58
> Im using radrails and mysql database, im using DATE in mysql for a date of birth column, When i use this in Radrails the date shows as dropdown lists, the days and month are fine but the year list only shows 2002-2012. > i was a bit misleaded because of the mysql bit, but after reading your mail twice i'd say the db has nothing to do with this problem and your problem is about date_select under this assumption, i would recommend to read through the date_select documentation, specially where it says " It's possible to tailor the selects through the options hash, which accepts all the keys that each of the individual select builders do (like :use_month_numbers for select_month <http://api.rubyonrails.com/classes/ActionView/Help...) as well as a range of discard options" then if you go to the "select_year" doc you will see a couple of interesting options: :start_year and :end_year. so.. if you provide date_select with these two options, you can constraint the date range to use instead of going with the default (which is 5 years before/after the given date). For future questions to the list i'd recommend to post the code where you have the problem, that way no assumptions about what you are doing are needed ;) regards, javier ramirez -- -------- Estamos de estreno... si necesitas llevar el control de tus gastos visita http://www.gastosgem.com !!Es gratis!!