# datetime\_select =\> "\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent\[starts\_at(3i)\]\[day\]"\>"

**URL:** <https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509>\
**Category:** rubyonrails-talk\
**Created:** [February 28, 2007, 11:54pm UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509 "2007-02-28T23:54:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [February 28, 2007, 11:54pm UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509/1 "2007-02-28T23:54:40Z")

</div>

Hi,

datetime\_select is playing funny tricks on me and generates crazy code :

&nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(3i)][day]"\>

=\> the server only receives the year and the month. The other parameters are lost.

In the view :

&nbsp;&nbsp;&nbsp;&nbsp;\<%= datetime\_select :event , :starts\_at %\>

would generate (in the browser)

&nbsp;&nbsp;&nbsp;\<select name="event[starts\_at(1i)]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="2003"\>2003\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="event[starts\_at(2i)]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="1"\>January\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(3i)][day]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="1" selected="selected"\>1\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(4i)][hour]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="00" selected="selected"\>00\</option\>

The server can only figure out the year and month; the rest is lost. It's not a surprise when ou see the params it receives.

params =\> &nbsp;&nbsp;&nbsp;{"commit"=\>"Wijzigen", "orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent"=\>{"starts\_at(3i)"=\>{"day"=\>"18"}, "starts\_at(4i)"=\>{"hour"=\>"17"}, "starts\_at(5i)"=\>{"minute"=\>"17"}}, "event"=\>{"starts\_at(1i)"=\>"2018", "starts\_at(2i)"=\>"12", "id"=\>"1", "hidden"=\>"1"}, "action"=\>"update\_event", "id"=\>"1", "controller"=\>"admin\_production", "page"=\>"4"}

Googled couldn't a match &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent

Is it just happening to me?

(I use EdgeRails and plugins)

Alain

---

<div class="post-metadata">

**Author:** ![Brian14](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@Brian14](https://discuss.rubyonrails.org/u/Brian14)\
**Post date:** [March 1, 2007, 3:41am UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509/2 "2007-03-01T03:41:41Z")

</div>

> Hi,
> 
> datetime\_select is playing funny tricks on me and generates crazy code :
> 
> &nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(3i)][day]"\>
> 
> =\> the server only receives the year and the month. The other parameters are lost.
> 
> In the view :
> 
> &nbsp;&nbsp;&nbsp;&nbsp;\<%= datetime\_select :event , :starts\_at %\>
> 
> would generate (in the browser)
> 
> &nbsp;&nbsp;&nbsp;\<select name="event[starts\_at(1i)]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="2003"\>2003\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="event[starts\_at(2i)]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="1"\>January\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(3i)][day]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="1" selected="selected"\>1\</option\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... &nbsp;&nbsp;&nbsp;\<select name="orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent[starts\_at(4i)][hour]"\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<option value="00" selected="selected"\>00\</option\>
> 
> The server can only figure out the year and month; the rest is lost. It's not a surprise when ou see the params it receives.
> 
> params =\> &nbsp;&nbsp;&nbsp;{"commit"=\>"Wijzigen", "orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent"=\>{"starts\_at(3i)"=\>{"day"=\>"18"}, "starts\_at(4i)"=\>{"hour"=\>"17"}, "starts\_at(5i)"=\>{"minute"=\>"17"}}, "event"=\>{"starts\_at(1i)"=\>"2018", "starts\_at(2i)"=\>"12", "id"=\>"1", "hidden"=\>"1"}, "action"=\>"update\_event", "id"=\>"1", "controller"=\>"admin\_production", "page"=\>"4"}
> 
> Googled couldn't a match &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orderyearmonthdayhourminuteseconduse\_hiddendiscard\_typetrueprefixevent
> 
> Is it just happening to me?
> 
> (I use EdgeRails and plugins)
> 
> Alain

---

<div class="post-metadata">

**Author:** ![Jason\_Roelofs](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jason\_Roelofs](https://discuss.rubyonrails.org/u/Jason_Roelofs)\
**Post date:** [March 1, 2007, 2:03pm UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509/3 "2007-03-01T14:03:01Z")

</div>

What you are seeing is a string output of a hash of values (try it in IRB, build a hash and to\_s it, you’ll get the same looking jumble of words). If that’s all you have in the datetime\_select call, you may have found a bug in Edge. You could try posting a bug report here: [http://dev.rubyonrails.org/](http://dev.rubyonrails.org/). I would suggest, if you can and what to, to look into the code and try to find out what’s happening with that call.

Jason

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [March 1, 2007, 4:24pm UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509/4 "2007-03-01T16:24:19Z")

</div>

> Is it just happening to me?

&nbsp;&nbsp;&nbsp;\> (I use EdgeRails and plugins)

Correction: it's also happening with the official release 1\_2\_2.

Alain Ravet

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [March 1, 2007, 4:26pm UTC](https://discuss.rubyonrails.org/t/datetime-select-select-name-orderyearmonthdayhourminuteseconduse-hiddendiscard-typetrueprefixevent-starts-at-3i-day/9509/5 "2007-03-01T16:26:19Z")

</div>

> I would suggest, if you can and what to, to look into the code and try to

&nbsp;&nbsp;\> find out what's happening with that call.

As usual, Murphy's laws come into action when you're pushing for a deadline. I'll PDI once it's over.

Alain
