有没有人遇到过这个问题?我有一个User对象和一个请求用户生日的simple_form。simple_form日期每月12号后不工作
<%= f.input :birthday, as: :date, start_year: Date.today.year - 70,
end_year: Date.today.year, order: [:month, :day, :year], label: false %>
我选择的任何日期我只能选择一天,直到每个月的12日。如果我选择第13或更高版本,simple_form会显示“请输入有效日期”。很奇怪。
我从https://github.com/plataformatec/simple_form得到了这段代码,它说的代码是“SimpleForm接受与Rails中相应的输入类型助手相同的选项”。有谁知道Rails中相应的输入类型助手在哪里记录?
我不认为就是这样。我更新了我的问题。 – mikeglaz 2013-02-23 20:36:47
好的,我找到了相应的rails窗体标签。这是date_select http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-date_select。当我使用这个而不是simple_form相当于一切正常。所以我不知道问题是什么。 – mikeglaz 2013-02-27 18:08:30