Class: RailsAdmin::Config::Fields::Types::Time

Inherits:
Datetime
  • Object
show all
Defined in:
lib/rails_admin/config/fields/types/time.rb

Instance Attribute Summary

Attributes inherited from Base

#abstract_model, #defined, #name, #order, #parent, #properties, #root, #section

Attributes included from Proxyable

#bindings

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Datetime

#formatted_date_value, #formatted_time_value, #js_date_format, #js_plugin_options, #localized_date_format, #localized_format, #localized_time_format, #meridian_indicator?, normalize

Methods included from I18nSupport

#abbr_day_names, #abbr_month_names, #date_format, #day_names, #month_names

Methods inherited from Base

#association?, #editable?, #errors, #html_default_value, #initialize, #inspect, #inverse_of, #method_name, #optional, #optional=, #optional?, #type, #type_css_class, #value, #virtual?

Methods included from Groupable

#group

Methods included from Hideable

#hidden?, #hide, included, #show

Methods included from Configurable

#has_option?, included, #register_deprecated_instance_option, #register_instance_option

Methods included from Proxyable

#with

Constructor Details

This class inherits a constructor from RailsAdmin::Config::Fields::Base

Class Method Details

.parse_date_string(date_string) ⇒ Object

Parse normalized date (time) strings using UTC



25
26
27
# File 'lib/rails_admin/config/fields/types/time.rb', line 25

def self.parse_date_string(date_string)
  ::DateTime.parse(date_string)
end

Instance Method Details

#parse_input(params) ⇒ Object



20
21
22
# File 'lib/rails_admin/config/fields/types/time.rb', line 20

def parse_input(params)
  params[name] = self.class.normalize(params[name], localized_time_format) if params[name].present?
end