Topic: Adding id parameter to html generated from date_select
I Have the following in my view
<%= date_select 'invoice', 'invoice_date', :order => [:day, :month, :year] %>
Which in html is turned into
<select name="invoice[invoice_date(3i)]">
...
<option value="5">5</option>
<option value="6" selected="selected">6</option>
...
</select><select name="invoice[invoice_date(2i)]">
...
<option value="11">November</option>
<option value="12" selected="selected">December</option>
</select>
#
<select name="invoice[invoice_date(1i)]">
...
<option value="2005">2005</option>
<option value="2006" selected="selected">2006</option>
...
</select>
I would like to set an observe_field on my view however for that I need my generated <select> tags to have an id. So:
1. Is there anyway of generating an id parameter to my <select> tag from date_select?
2. Is there a way to use the name parameter in <select> in order to use observe_field?
Thanx in advance
Fabricio.