You are browsing documentation for version 5.0 of OroCommerce, OroCRM, and OroPlatform, maintained until August 2024 and supported until March 2026. See version 5.1 (the latest LTS version) of the Oro documentation for information on latest features.

See our Release Process documentation for more information on the currently supported and upcoming releases.

DateEditorView ⇐ TextEditorView

Date cell content editor.

Column configuration examples:

      enable: true
    # <grid configuration> goes here
      # Sample 1. Mapped by frontend type
        frontend_type: date
      # Sample 2. Full configuration
            view: oroform/js/app/views/editor/date-editor-view
              css_class_name: '<class-name>'
                altFormat: 'yy-mm-dd'
                changeMonth: true
                changeYear: true
                yearRange: '-80:+1'
                showButtonPanel: true
            NotBlank: true
              route: '<route>'
                 - '<parameter1>'
                 - '<parameter2>'

Options in YML

Column Option Name Description
inline_editing.editor.view_options.css_class_name Optional. Additional css class name for editor view DOM element
inline_editing.editor.view_options.dateInputAttrs Optional. Attributes for the date HTML input element
inline_editing.editor.view_options.datePickerOptions Optional. See datepicker documentation
inline_editing.validation_rules Optional. Validation rules. See JS Validation topic for more information
inline_editing.save_api_accessor Optional. Sets accessor module, route, parameters etc.

Constructor Parameters

Extends: TextEditorView

Param Type Description
options Object Options container
options.model Object Current row model
options.fieldName string Field name to edit in model
options.validationRules Object Validation rules. See JS Validation topic for more information
options.dateInputAttrs Object Attributes for date HTML input element
options.datePickerOptions Object See datepicker documentation
options.value string initial value of edited field

dateEditorView.getViewOptions() ⇒ Object

Prepares and returns editor sub-view options

Kind: instance method of DateEditorView