Form Helper Text_field with datepicker calendar

How do I set an id attribute like id=“datepicker” in an input text_field
using a form helper.

I tried this:-
<%= f.text_field :paid_date, :id=“datepicker” %>
but it produces an error.

Note that I want as
the result, not which
is all I can find in the API.

On 15 July 2010 07:28, Mark H. [email protected] wrote:

How do I set an id attribute like id=“datepicker” in an input text_field
using a form helper.

I tried this:-
<%= f.text_field :paid_date, :id=“datepicker” %>
but it produces an error.

Note that I want as
the result, not which
is all I can find in the API.

Can you not just manage with the default id which should be
<model_name>_paid_date I think?

Colin

Can you not just manage with the default id which should be
<model_name>_paid_date I think?

Colin

The jQuery datepicker calendar wants id=“datepicker” on the input field.

Mark H. wrote:

Can you not just manage with the default id which should be
<model_name>_paid_date I think?

Colin

The jQuery datepicker calendar wants id=“datepicker” on the input field.

I found the error, I had omitted a closing “>” on the preceding td
element. Now I just have to deal with the calendar wanting to wrap the
arrows for month selection :frowning:

Mark H. wrote:

Mark H. wrote:

Can you not just manage with the default id which should be
<model_name>_paid_date I think?

Colin

The jQuery datepicker calendar wants id=“datepicker” on the input field.

I found the error, I had omitted a closing “>” on the preceding td
element.

I strongly suggest using HAML, not ERb, for your views. Besides lots of
other advantages, you’ll never leave off a > again!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]