Sha256: c2e61c6d0cc1a25c8f8e6ec8d2952fbe6b581a4c91943d333d3f908c7c2672bd

Contents?: true

Size: 399 Bytes

Versions: 10

Compression:

Stored size: 399 Bytes

Contents

module SimpleForm
  module Inputs
    class DateTimeInput < Base
      def input
        @builder.send(:"#{input_type}_select", attribute_name, input_options, input_html_options)
      end

      def label_target
        case input_type
          when :date, :datetime
            "#{attribute_name}_1i"
          when :time
            "#{attribute_name}_4i"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
simple_form-1.0.4 lib/simple_form/inputs/date_time_input.rb
simple_form-1.0.3 lib/simple_form/inputs/date_time_input.rb
simple_form-1.0.2 lib/simple_form/inputs/date_time_input.rb
simple_form-1.0.1 lib/simple_form/inputs/date_time_input.rb
simple_form-1.2.0 lib/simple_form/inputs/date_time_input.rb
simple_form-1.1.3 lib/simple_form/inputs/date_time_input.rb
simple_form-1.1.2 lib/simple_form/inputs/date_time_input.rb
simple_form-1.1.1 lib/simple_form/inputs/date_time_input.rb
simple_form-1.1.0 lib/simple_form/inputs/date_time_input.rb
simple_form-1.0.0 lib/simple_form/inputs/date_time_input.rb