Forum: Ruby on Rails Does observe_field work with date_select?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
25b8f220c31cb06d10d0f95ac50d6af1?d=identicon&s=25 Se Wa (gorbadica)
on 2006-04-04 20:24
I can't get observe_field to do anything with my date_select. Here's the
rhtml code:

<%= date_select 'course', 'lab_start_date'  %>

<%= observe_field(:course_lab_start_date, :frequency => 0.5,
                  :update => :course_lab_start_date_div, :url => {
:action => 'preview_text'}) %>

My 'preview_text' action is never called. Looking at the html generated,
date_select generates three seperate select fields, and none of them
have id's. observe_field of course watches for the id...

Any ideas? Any ideas that don't involve having three seperate selects,
each with their own observe_field? I really want to treat this as a
single date object.
This topic is locked and can not be replied to.