Sha256: 6acde6b712d4d29db83788bf063ae0ede4d8a1adfe57ad25f067d06c5de4f0a9

Contents?: true

Size: 529 Bytes

Versions: 6

Compression:

Stored size: 529 Bytes

Contents

module TaoForm
  module Components
    class TimePickerComponent < MomentPicker::Base

      def input_type
        @input_type ||= :time
      end

      def segments
        @segments ||= [:hour, {separator: ':'}, {name: :minute, step: options[:minute_step]}]
      end

      def default_segment
        @default_segment ||= :hour
      end

      def self.component_name
        :time_picker
      end

      private

      def default_options
        super.merge({icon: :clock, minute_step: 5})
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tao_form-0.1.9 lib/tao_form/components/time_picker_component.rb
tao_form-0.1.8 lib/tao_form/components/time_picker_component.rb
tao_form-0.1.7 lib/tao_form/components/time_picker_component.rb
tao_form-0.1.6 lib/tao_form/components/time_picker_component.rb
tao_form-0.1.5 lib/tao_form/components/time_picker_component.rb
tao_form-0.1.4 lib/tao_form/components/time_picker_component.rb