Update orbit_form_helper.rb

This commit is contained in:
chiu 2020-11-03 13:17:13 +08:00
parent 19ea23c177
commit d194f962dd
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ module OrbitFormHelper
end end
def datetime_picker(object_name, options = {}) def datetime_picker(object_name, options = {})
def objectify_options(options)
@default_options = {} if @default_options.class != Hash
@default_options.merge(options.merge(object: @object))
end
options[:icon_time] ||= 'icons-clock' options[:icon_time] ||= 'icons-clock'
options[:icon_date] ||= 'icons-calendar' options[:icon_date] ||= 'icons-calendar'
options[:icon_clear] ||= 'icons-cross-3' options[:icon_clear] ||= 'icons-cross-3'