Simple_for gems, bootstrap3-datetimepicker-rails, bootstrap-sass gems are bolted to the fields. After submita, the start_date and end_date fields send empty values to the params hash. What could be the problem ... who knows? thank
] 1
- onePaste the code as a code fragment, and not as a picture - Mikhail Vaysman
- Insert text, not a picture. And attach the details: what parameters are there in the request, for example. - D-side
|
1 answer
Thank you all! I just didn’t config/initializers/date_time_picker_input.rb few lines to the config/initializers/date_time_picker_input.rb file. This is purely my mistake. Here is the original for the bootstrap datetimepickera to work:
class DateTimePickerInput < SimpleForm::Inputs::Base def input template.content_tag(:div, class: 'input-group date form_datetime') do template.concat @builder.text_field(attribute_name, input_html_options) template.concat span_table end end def input_html_options classes = (super[:class] || []) classes << :'form-control' options = super options.merge({class: classes}) options.merge({readonly: false}) unless options[:readonly] options end end |