# Date\_select and observe\_field

**URL:** <https://www.ruby-forum.com/t/date-select-and-observe-field/145148>\
**Category:** Rails\
**Created:** [August 6, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/date-select-and-observe-field/145148 "2008-08-06T14:36:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [August 6, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/date-select-and-observe-field/145148/1 "2008-08-06T14:36:41Z")

</div>

Google didn;t throw too much up on this but I’m sure I’m not the forst  
to have this problem.

\<%= date\_select ‘client’, ‘dob’,  
Â Â Â Â Â Â Â :use\_month\_numbers =\> false,  
Â Â Â Â Â Â Â :order =\> [:day,:month,:year],  
Â Â Â Â Â Â Â :start\_year =\> 1920,  
Â Â Â Â Â Â Â :end\_year =\> @this\_year,  
Â Â Â Â Â Â Â :include\_blank =\> true %\>

I’ve tried a few variations for the observe\_field (below) but no luck.  
Could anyone shed some light on this, please?

Â Â Â Â Â Â Â Â \<%= observe\_field(“client\_dob”,  
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :update =\> “age”,  
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :url =\> { :controller =\> ‘client’, :action =\>  
:age },  
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :with =\> “‘dob(1i)=’ + escape($(‘dob(1i)’) +  
‘&dob(2i)=’ + escape($(‘dob(2i)’).value) + ‘&dob(3i)=’ +  
escape($(‘dob(3i)’).value”,  
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :on =\> “changed”,  
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :frequency =\> 0.3 ) %\>

\<%= observe\_field(“client\_dob\_3i”,

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :update =\> “age”,

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :url =\> { :controller =\> ‘client’, :action =\>  
:age },

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :with =\> “‘dob(1i)=’ +  
escape($(‘dob(1i)’) + ‘&dob(2i)=’ + escape($(‘dob(2i)’).value) +  
‘&dob(3i)=’ + escape($(‘dob(3i)’).value”,

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :on =\> “changed”,

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â :frequency =\> 0.3 ) %\>

Merci

-Ants

Disclaimer: Technically speaking, I am always wrong!

```
  __________________________________________________________

```

Not happy with your email address?.  
Get the one you really want - millions of new email addresses available  
now at Yahoo! [http://uk.docs.yahoo.com/ymail/new.html](http://uk.docs.yahoo.com/ymail/new.html)
