Class: TaoForm::Components::DatePickerComponent

Inherits:
MomentPicker::Base show all
Defined in:
lib/tao_form/components/date_picker_component.rb

Instance Attribute Summary

Attributes inherited from 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 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



19
20
21
# File 'lib/tao_form/components/date_picker_component.rb', line 19

def self.component_name
  :date_picker
end

Instance Method Details

#default_segmentObject



15
16
17
# File 'lib/tao_form/components/date_picker_component.rb', line 15

def default_segment
  @default_segment ||= :date
end

#input_typeObject



7
8
9
# File 'lib/tao_form/components/date_picker_component.rb', line 7

def input_type
  @input_type ||= :date
end

#segmentsObject



11
12
13
# File 'lib/tao_form/components/date_picker_component.rb', line 11

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