Class: KonoUtils::Object::Cell::Forms::Fields::DateField

Inherits:
DateTimeField
  • Object
show all
Defined in:
app/concepts/kono_utils/object/cell/forms/fields/date_field.rb

Overview

La cella base dei componenti della form contiene sempre la form come model

Instance Method Summary collapse

Methods inherited from DateTimeField

#base_field_options, #datetime_picker_identifier, #show

Methods inherited from Base

#_prefixes, #base_class, #concept, #content_for_layout, #content_for_layout?, #destroy_custom_polymorphic_path, #edit_custom_polymorphic_path, #index_custom_polymorphic_path, #kono_user, #legacy_concept, logger, #model_gender, #new_custom_polymorphic_path, #show_custom_polymorphic_path, #title_del, #title_del_g, #title_edit_g, #title_mod, #title_new, #title_new_g, #title_newa, #title_show_g

Methods included from KonoUtilsBootstrapView4::ApplicationIconHelper

#fa_icon, #icon

Instance Method Details

#input_picker_formatObject



9
10
11
# File 'app/concepts/kono_utils/object/cell/forms/fields/date_field.rb', line 9

def input_picker_format
  "L"
end

#input_valueObject



13
14
15
16
# File 'app/concepts/kono_utils/object/cell/forms/fields/date_field.rb', line 13

def input_value
  value = form.object.send(attribute_name)
  value.is_a?(Date) ? "date: moment('#{value&.rfc2822}')," : ''
end