class Voom::Presenters::DSL::Components::DateField

Constants

DEFAULT_ERROR
DEFAULT_HINT

Attributes

config[R]

Public Class Methods

new(**attribs_, &block) click to toggle source
Calls superclass method
# File lib/voom/presenters/dsl/components/date_field.rb, line 13
def initialize(**attribs_, &block)
  super(type: :date, **attribs_, &block)
  merge_config(:min_date)
  merge_config(:max_date)
  unless @picker
    @hint ||= DEFAULT_HINT
    @validation_error ||= DEFAULT_ERROR
  end
  expand!
end

Public Instance Methods

validation_error(error=nil) click to toggle source
# File lib/voom/presenters/dsl/components/date_field.rb, line 24
def validation_error(error=nil)
  return @validation_error if locked?
  @validation_error ||= error
end