Class: FormProps::Inputs::DatetimeField

Inherits:
TextField
  • Object
show all
Defined in:
lib/form_props/inputs/datetime_field.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #json

Constructor Details

This class inherits a constructor from FormProps::Inputs::Base

Instance Method Details

#renderObject



6
7
8
9
10
11
# File 'lib/form_props/inputs/datetime_field.rb', line 6

def render
  @options[:value] ||= format_date(value)
  @options[:min] = format_date(datetime_value(@options["min"]))
  @options[:max] = format_date(datetime_value(@options["max"]))
  super
end