Wrong render of :date #138

Closed
alec-c4 opened this Issue Nov 26, 2009 · 3 comments

2 participants

@alec-c4

Hi, could you tell me plz - why on code
- semantic_form_for :profile, :html => { :method => :put }, :url => update_profile_path do |form|
e
- form.inputs do
e
= form.error_messages
e
e
= form.input :female, :as => :select, :collection => [["Male", false], ["Female", true]]
e
= form.input :birthdate, :as => :date, :start_year => 1900
= form.input :timezone, :as=> :time_zone

e
- form.buttons do
e
= form.commit_button "Save"

formtastic renders

  • Birthdate*
    1. Year 1900 1901 1902 1903 <option value="1904">1904</option> <option value="1905">1905</option> <option value="1906">1906</option> <option value="1907">1907</option> ........................ 2014
    2. Month 114 <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> </li><li><label for="profile_birthdate_3i">Day</label><select id="profile_birthdate_3i" name="profile[birthdate(3i)]"> <option value="1">1</option> <option value="2">2</option> .......................... <option value="30">30</option> <option value="31">31</option> </select> plz have a look at year field (why ended at 2014?) and month (very strange - digits instead month names) :(
  • @grimen

    Question 1: "Why ended at 2014?"

    You can adjust this using Rails core options (e.g. :end_year):

    http://railsapi.com/doc/rails-v2.3.4/classes/ActionView/Helpers/DateHelper.html#M005680

    Question 2: Digits instead of month names...

    • Passing this ball to Justin, I never seen such behavior and don't really got a qualified guess why right now. =S
    @grimen

    Duplicate, closing....

    @alec-c4

    which issue duplicated by my post?

    This issue was closed.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment