# Date field translation on the GUI

**URL:** <https://www.ruby-forum.com/t/date-field-translation-on-the-gui/89700>\
**Category:** Rails\
**Created:** [March 22, 2007, 6:18am UTC](https://www.ruby-forum.com/t/date-field-translation-on-the-gui/89700 "2007-03-22T06:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvenkata](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/c89c15/32.png) [@hvenkata](https://www.ruby-forum.com/u/hvenkata)\
**Post date:** [March 22, 2007, 6:18am UTC](https://www.ruby-forum.com/t/date-field-translation-on-the-gui/89700/1 "2007-03-22T06:18:28Z")

</div>

date\_select(object\_name, method, options = {})

When the date\_select method is it returns a select tags. The days tag  
is always set to 31 days. Is there a way to make the month and days  
tag relative. For example when the month is selected as January the  
number of days should be 31 and when the month is selected for  
February the number of days should be 28 or 29 depending on whether it  
is a leap year.

Is there a easy way to do this?

Cheers  
Hari

---

<div class="post-metadata">

**Author:** ![hvenkata](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/c89c15/32.png) [@hvenkata](https://www.ruby-forum.com/u/hvenkata)\
**Post date:** [March 22, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/date-field-translation-on-the-gui/89700/2 "2007-03-22T19:48:06Z")

</div>

On 3/21/07, Hari [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a easy way to do this?  
> It’s not too hard with Javascript, though it is a bit tedious. I use  
> the Simple Date Select plugin [1], which avoids the problem entirely.

[1] [Peak Obsession](http://wiki.rubyonrails.com/rails/pages/Simple+Date+Select+Plugin).

Jeremy
