如何select时间选项?
How to select time options?
在 ruby、my_form.html.erb
我有:
<%= f.input :doors, collection => :00, :15, :30, :45, prompt => "Select the time" %>
如何允许用户以 :15 分钟为间隔 select 一个小时和几分钟?我也在使用 simple_form.
答案是minute_step:
<%= f.input :doors, {minute_step: 15}%>
<%= f.input :showtime, {minute_step: 15} %>
在 ruby、my_form.html.erb
我有:
<%= f.input :doors, collection => :00, :15, :30, :45, prompt => "Select the time" %>
如何允许用户以 :15 分钟为间隔 select 一个小时和几分钟?我也在使用 simple_form.
答案是minute_step:
<%= f.input :doors, {minute_step: 15}%>
<%= f.input :showtime, {minute_step: 15} %>