# Reg date format

**URL:** <https://www.ruby-forum.com/t/reg-date-format/105055>\
**Category:** Rails\
**Created:** [May 25, 2007, 10:47am UTC](https://www.ruby-forum.com/t/reg-date-format/105055 "2007-05-25T10:47:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [May 25, 2007, 10:47am UTC](https://www.ruby-forum.com/t/reg-date-format/105055/1 "2007-05-25T10:47:03Z")

</div>

in my page there is two drop down in which one should be year and month  
and another should be corresponding year and month date should be  
shown…for eg if i clicked may2007 ,in the next drop down it should list  
31 days if i select feb 2007 it should show list of 28 days.is any one  
knows solution for this?please reply…

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [May 25, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/reg-date-format/105055/2 "2007-05-25T13:51:32Z")

</div>

try to use an onClick event with JS and render what you need through  
rjs to the second element.

On 25 Mai, 10:47, Shiva K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [May 25, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/reg-date-format/105055/3 "2007-05-25T16:39:06Z")

</div>

You can use observe\_field helper:  
[http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3APrototypeHelper/observe\_field](http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3APrototypeHelper/observe_field)
