Class: Daisy::DataInput::CallyInputComponent::CallyCalendarComponent
- Inherits:
-
Daisy::DataInput::CallyComponent
- Object
- ViewComponent::Base
- LocoMotion::BaseComponent
- Daisy::DataInput::CallyComponent
- Daisy::DataInput::CallyInputComponent::CallyCalendarComponent
- Defined in:
- app/components/daisy/data_input/cally_input_component.rb
Overview
A specialized calendar component for the CallyInput that handles the calendar display and interaction within a popover.
Constant Summary
Constants inherited from LocoMotion::BaseComponent
LocoMotion::BaseComponent::EMPTY_PART_IGNORED_TAGS, LocoMotion::BaseComponent::SELF_CLOSING_TAGS
Instance Attribute Summary
Attributes inherited from LocoMotion::BaseComponent
Instance Method Summary collapse
-
#before_render ⇒ void
Sets up the HTML attributes needed for the calendar before rendering.
- #call ⇒ Object
Methods inherited from Daisy::DataInput::CallyComponent
#default_next_icon, #default_previous_icon, #initialize, #month_options
Methods inherited from LocoMotion::BaseComponent
build, #component_ref, #config_option, #cssify, define_modifier, define_modifiers, define_part, define_parts, define_size, define_sizes, #empty_part_content, #initialize, #inspect, #part, register_component_initializer, register_component_setup, #rendered_css, #rendered_data, #rendered_html, #rendered_stimulus_controllers, #rendered_tag_name, renders_many, renders_one, set_component_name, #set_loco_parent, #strip_spaces
Constructor Details
This class inherits a constructor from Daisy::DataInput::CallyComponent
Instance Method Details
#before_render ⇒ void
This method returns an undefined value.
Sets up the HTML attributes needed for the calendar before rendering. Configures the ID, value, and data attributes required for the Stimulus controller.
67 68 69 70 71 72 73 74 75 76 77 |
# File 'app/components/daisy/data_input/cally_input_component.rb', line 67 def before_render super add_html(:component, { id: @id || loco_parent.calendar_id, value: @value || loco_parent.value, data: { "loco-cally-input-target": "calendar" } }) end |
#call ⇒ Object
79 80 81 |
# File 'app/components/daisy/data_input/cally_input_component.rb', line 79 def call render_parent_to_string end |