More on date_select/select_date
I’ve recently been attempting to write Javascript code to work with the values in select boxes created through both date_select (works with dates that are accessed through a method on an object) and select_date (works with any date object you pass to it). Rather inconveniently, Rails names/ids the select boxes differently for these 2 cases.
date_select style ids:
id="<objectname>_<methodname>_3i" for day
id="<objectname>_<methodname>_2i" for month
id="<objectname>_<methodname>_1i" for year
select_date style ids:
id="<prefix>_day" for day
id="<prefix>_month" for month
id="<prefix>_year" for year
where <prefix> is either “date” or whatever you specify in the options to select_date.