Class: TaoForm::Components::MonthPickerComponent

Inherits:
TaoForm::Components::MomentPicker::Base show all
Defined in:
lib/tao_form/components/month_picker_component.rb

Instance Attribute Summary

Attributes inherited from TaoForm::Components::MomentPicker::Base

#block_for_render, #list_options, #result_options

Attributes inherited from FieldComponent

#attribute_name, #builder

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TaoForm::Components::MomentPicker::Base

#initialize, #placeholder, #render, #render_result, #render_segment_list

Methods inherited from FieldComponent

#initialize

Constructor Details

This class inherits a constructor from TaoForm::Components::MomentPicker::Base

Class Method Details

.component_nameObject



17
18
19
# File 'lib/tao_form/components/month_picker_component.rb', line 17

def self.component_name
  :month_picker
end

Instance Method Details

#default_segmentObject



13
14
15
# File 'lib/tao_form/components/month_picker_component.rb', line 13

def default_segment
  @default_segment ||= :month
end

#input_typeObject



5
6
7
# File 'lib/tao_form/components/month_picker_component.rb', line 5

def input_type
  @input_type ||= :month
end

#segmentsObject



9
10
11
# File 'lib/tao_form/components/month_picker_component.rb', line 9

def segments
  @segments ||= %w(year month)
end