Sha256: a02ab2c78cebc646f4d671c055351ab7e3b112029d2336486867bd38cf76b42d

Contents?: true

Size: 587 Bytes

Versions: 9

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module Archangel
  ##
  # Time picker custom input for SimpleForm
  #
  class TimePickerInput < SimpleForm::Inputs::Base
    ##
    # Build input field
    #
    # @param wrapper_options [Hash] the wrapper options
    #
    def input(wrapper_options = nil)
      merged_input_options =
        merge_wrapper_options(input_html_options, wrapper_options)

      @builder.text_field(attribute_name, merged_input_options)
    end

    ##
    # Add `timepicker` as an HTML class
    #
    def input_html_classes
      super.push("timepicker")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
archangel-0.4.0 app/inputs/archangel/time_picker_input.rb
archangel-0.3.0 app/inputs/archangel/time_picker_input.rb
archangel-0.0.8 app/inputs/archangel/time_picker_input.rb
archangel-0.0.7 app/inputs/archangel/time_picker_input.rb
archangel-0.0.6 app/inputs/archangel/time_picker_input.rb
archangel-0.0.5 app/inputs/archangel/time_picker_input.rb
archangel-0.0.4 app/inputs/archangel/time_picker_input.rb
archangel-0.0.3 app/inputs/archangel/time_picker_input.rb
archangel-0.0.2 app/inputs/archangel/time_picker_input.rb