Date_select css options

Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.

I was wondering how do other group members css format date select
dropdowns?

Best,

Gabor

On 6/13/07, gabordemeter [email protected] wrote:

Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.

I was wondering how do other group members css format date select
dropdowns?

Use a wrapper element and then style using CSS selectors:

content_tag(:div, date_select(:widget, :date), :class =>
‘date_select’)

CSS:

.date_select select { … }

Thanks Bob. I thought of that myself but wanted to double check that
there’s no other more direct way to do it.

On 6/13/07, gabordemeter [email protected] wrote:

Thanks Bob. I thought of that myself but wanted to double check that
there’s no other more direct way to do it.

It looks like you’ll be able to set html options in the future:

http://dev.rubyonrails.org/ticket/6000