Overriding or changing HTML generated by date_select?

Hi,

I’m looking for a way to customize the HTML forms generated by
date_select. I’m especially keen on replacing the year and possibly
day input by a simple text field, since honestly, I find listboxes for
years to be quite retarded (if I wanted client-side validation, there
would be better ways to do that instead of having people try and find
their year of birth in a list of approximately a hundred entries). Is
there a way to do that without manually hardcoding form fields in the
view?

On Dec 26, 2007 3:41 PM, [email protected] [email protected]
wrote:

I’m looking for a way to customize the HTML forms generated by
date_select.

You can hack ActiveView::Helpers::DateHelper if you’d like, or wrap
date_select in a helper of your own and manipulate the output there,
but I suspect you’ll do just as well without it.

Take a look at this railscast:

I think Ryan B. shows how to do almost exactly what you want.

  • Martin

On Dec 26, 7:26 pm, “Martin S.” [email protected] wrote:

On Dec 26, 2007 3:41 PM, [email protected] [email protected] wrote:

I’m looking for a way to customize the HTML forms generated by
date_select.

Take a look at this railscast:#32 Time in Text Field - RailsCasts

Thanks a lot, that looks like a good point to start from. They need to
make those casts more search-friendly in some way, all that web
searches turned up were JScript calendars.