Class: Formulary::HtmlForm::Fields::MonthInput

Inherits:
DateInput show all
Defined in:
lib/formulary/html_form/fields/month_input.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DateInput

#error, #initialize, #valid?

Methods inherited from Input

compatible_with?, #error, supports_required?, #valid?

Methods inherited from Field

#error, #get_value_from_data_field, #initialize, #is_hidden?, #label, #name, #set_value, supports_required?, #valid?

Constructor Details

This class inherits a constructor from Formulary::HtmlForm::Fields::DateInput

Class Method Details

.compatible_typeObject



3
4
5
# File 'lib/formulary/html_form/fields/month_input.rb', line 3

def self.compatible_type
  "month"
end

Instance Method Details

#datetime_formatObject



11
12
13
# File 'lib/formulary/html_form/fields/month_input.rb', line 11

def datetime_format
  "%Y-%m"
end

#display_formatObject



7
8
9
# File 'lib/formulary/html_form/fields/month_input.rb', line 7

def display_format
  "YYYY-MM"
end