# Date helpers --\> where art thou, html\_options?

**URL:** <https://www.ruby-forum.com/t/date-helpers-where-art-thou-html-options/50162>\
**Category:** Rails\
**Created:** [December 13, 2005, 8:31pm UTC](https://www.ruby-forum.com/t/date-helpers-where-art-thou-html-options/50162 "2005-12-13T20:31:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![coldcrush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e68b1a/32.png) [@coldcrush](https://www.ruby-forum.com/u/coldcrush)\
**Post date:** [December 13, 2005, 8:31pm UTC](https://www.ruby-forum.com/t/date-helpers-where-art-thou-html-options/50162/1 "2005-12-13T20:31:21Z")

</div>

Hi railsians, just wondering if anyone has any info on passing  
html\_options to date helpers?

My problem is that I need to do a select\_month, but I need to pass an ID  
attribute to the HTML and there are no html\_options for those helpers  
apparently. The reason why I need to pass the ID is to access it in JS,  
and I can’t because of the name of the select is for the hash (ie  
“date[month]”), which means it has brackets (my JS skills are rusty,  
maybe there’s a way to access it even with that name?

thx

---

<div class="post-metadata">

**Author:** ![coldcrush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e68b1a/32.png) [@coldcrush](https://www.ruby-forum.com/u/coldcrush)\
**Post date:** [December 14, 2005, 2:07am UTC](https://www.ruby-forum.com/t/date-helpers-where-art-thou-html-options/50162/2 "2005-12-14T02:07:35Z")

</div>

tieg infosauce wrote:

> Hi railsians, just wondering if anyone has any info on passing  
> html\_options to date helpers?
> 
> My problem is that I need to do a select\_month, but I need to pass an ID  
> attribute to the HTML and there are no html\_options for those helpers  
> apparently. The reason why I need to pass the ID is to access it in JS,  
> and I can’t because of the name of the select is for the hash (ie  
> “date[month]”), which means it has brackets (my JS skills are rusty,  
> maybe there’s a way to access it even with that name?

You may be able to use document.getElementsByName(‘date[month]’).

I found three pending patches for adding id attributes to date helpers:

```
http://dev.rubyonrails.org/ticket/1050
http://dev.rubyonrails.org/ticket/1382
http://dev.rubyonrails.org/ticket/2655

```

–  
We develop, watch us RoR, in numbers too big to ignore.
