formtastic weird month name display

Posted by Alexey Poimtsev on Stack Overflow See other posts from Stack Overflow or by Alexey Poimtsev
Published on 2010-05-21T20:18:35Z Indexed on 2010/05/21 20:20 UTC
Read the original article Hit count: 258

Filed under:
|
|

Hi, i'm using formtastic, all is ok, but strange thing - on

= form.input :birthdate, :as => :date 

it renders to something like

<li><label for="profile_birthdate_2i">Month</label><select
id="profile_birthdate_2i" name="profile[birthdate(2i)]">
    <option value="1">114</option>

    <option value="2">97</option>
    <option value="3">110</option>
    <option value="4">115</option>
    <option value="5">108</option>
    <option value="6">97</option>
    <option value="7">116</option>

    <option value="8">105</option>
    <option value="9">111</option>
    <option value="10">110</option>
    <option value="11">32</option>
    <option value="12">109</option>
    </select> 

but if i'm using in semantic_form something like

= form.datetime_select :birthdate 

it renders correctly. I've found information, that it may be caused by locale file with no translations for month names, but its so strange - why rails helpers renders month names ok, but formtastic - not :(

any ideas?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails