再使用 rails select_datetime 这个 helper 时 需要加载什么 JS 文件么? 需求: 一个搜索表单
<form class="accordion-inner" action="/controller_name/action_name">
<div>
<label>开始时间</label>
<%#= datetime_select :start, {}, :default => params[:start] %>
<%#= hidden_field_tag 'start', "#{params[:start]}"%>
<%#= datetimepicker_for :start, params[:start]%>
<%#= params[:start]%>
<%= select_datetime(Time.now, {}, :name => :start )%>
</div>
<div>
<label>结束时间</label>
<%#= datetime_select :end, {}, :default => params[:end] %>
<%#= hidden_field_tag 'end', "#{params[:end]}"%>
<%#= datetimepicker_for :end, params[:end] params[:end]|| %>
<%= select_datetime(Time.now, {}, :name => :start, :id => :start )%>
</div>
<div>
<a href="#" class="clear-time btn btn-primary">不限时间</a>
</div>
<div class='form-actions'>
<%= submit_tag 'search' %>
</div>
</form>
这里的 select_datetime 在火狐浏览器中无法点击(火狐设置了 user agent 为 mobile 的相关请求) 菜鸟求解 呵呵