Class: Formtastic::Inputs::DatePickerInput
- Inherits:
-
StringInput
- Object
- StringInput
- Formtastic::Inputs::DatePickerInput
- Defined in:
- lib/formtastic/date_picker_input.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#css_class ⇒ Object
19 20 21 |
# File 'lib/formtastic/date_picker_input.rb', line 19 def css_class "ui-datepicker-input ui-date-picker-input" end |
#format ⇒ Object
11 12 13 |
# File 'lib/formtastic/date_picker_input.rb', line 11 def format [:format] || I18n.t('date.formats.date_picker', :default => '%d/%m/%Y') end |
#input_html_options ⇒ Object
23 24 25 26 |
# File 'lib/formtastic/date_picker_input.rb', line 23 def new_class = [super[:class], css_class].compact.join(" ") super.update(:class => new_class, :value => value) end |
#to_html ⇒ Object
4 5 6 7 8 9 |
# File 'lib/formtastic/date_picker_input.rb', line 4 def to_html input_wrapping do label_html << builder.text_field(input_name, ) end end |
#value ⇒ Object
15 16 17 |
# File 'lib/formtastic/date_picker_input.rb', line 15 def value [:value] || object.send(method).try(:strftime, format) end |