0
我正在使用jQuery插件的日期时间选择器,它需要将类型参数设置为'文本'。有没有办法阻止Formtastic重写“type”参数?
所以,我想正常的方法:
= semantic_form_for @schedule do |f|
= f.input :start_at, :as => :datetime_picker, :input_html => { :class=> 'datetimepicker', :type => 'text' }
但Formtastic是压倒一切的该类型并将其设置为datetime-地方。
<input id="datetimepicker" maxlength="16" name="schedule[start_at]" size="16" step="1" type="datetime-local">
有没有办法否定Formtastic自动设置类型,而不更改宝石?