Class: DaisyUI::Calendar
- Defined in:
- lib/daisy_ui/calendar.rb
Overview
Supports Cally web component and Pikaday date picker
Constant Summary
Constants inherited from Base
Base::BOOLS, Base::COLOR_MODIFIERS
Instance Method Summary collapse
-
#initialize(type: :cally) ⇒ Calendar
constructor
A new instance of Calendar.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(type: :cally) ⇒ Calendar
Returns a new instance of Calendar.
13 14 15 16 |
# File 'lib/daisy_ui/calendar.rb', line 13 def initialize(*, type: :cally, **) super(*, **) @type = type end |
Instance Method Details
#view_template ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/daisy_ui/calendar.rb', line 18 def view_template(&) case type when :cally render_cally(&) when :pikaday render_pikaday end end |