Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::DatePickerField

Inherits:
ActionField
  • Object
show all
Defined in:
lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb

Instance Attribute Summary collapse

Attributes inherited from ActionField

#collection_name, #description, #enum_values, #id, #is_read_only, #is_required, #label, #placeholder, #type, #value, #watch_changes

Instance Method Summary collapse

Methods inherited from ActionField

#to_h, #watch_changes?

Constructor Details

#initialize(options) ⇒ DatePickerField

Returns a new instance of DatePickerField.



70
71
72
73
74
75
76
77
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 70

def initialize(options)
  super(**options)
  @widget = 'DatePicker'
  @format = options[:format] || nil
  @min = options[:min] || nil
  @max = options[:max] || nil
  @step = options[:step] || nil
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



68
69
70
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 68

def format
  @format
end

#maxObject

Returns the value of attribute max.



68
69
70
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 68

def max
  @max
end

#minObject

Returns the value of attribute min.



68
69
70
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 68

def min
  @min
end

#stepObject

Returns the value of attribute step.



68
69
70
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 68

def step
  @step
end

#widgetObject

Returns the value of attribute widget.



68
69
70
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 68

def widget
  @widget
end