Sha256: 1b582d49b4f02c0a84fce5f111d15f2c4f8249f88ac9f921c81a296c21d16e02
Contents?: true
Size: 958 Bytes
Versions: 2
Compression:
Stored size: 958 Bytes
Contents
require 'simple_form' module SimpleForm module Inputs class DatetimepickerInput < Base def input multiple_inputs_buffer = "" # Build the CSS and input necessary for datetimepicker_date input_html_classes.push(partial_input_name(:date)) multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:date)}", input_html_options) input_html_classes.delete(partial_input_name(:date)) # Build the CSS and input necessary for datetimepicker_time input_html_classes.push(partial_input_name(:time)) multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:time)}", input_html_options) input_html_classes.delete(partial_input_name(:time)) return multiple_inputs_buffer end private def partial_input_name(which_input) "datetimepicker_#{which_input}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datetimepicker-0.0.3 | lib/datetimepicker/simple_form/inputs/datetimepicker_input.rb |
datetimepicker-0.0.2 | lib/datetimepicker/simple_form/inputs/datetimepicker_input.rb |