Motivation

Excel files support basic/primitive data types. However, most would include something like a start date and end date type of data. In Drupal, this is mostly handled by the Date Range core module. It would be great if the Excel Importer was able to detect such fields and supply the appropriate data and structure when creating a node with Date Range fields.

Proposed resolution

When trying to get the correct value to pass to the node creation code, detect the field type and if it's a type of "daterange" supply an array of the following structure:

[ 
   "value" => "2020-11-18T12:00:00", 
   "end_value" => "2020-11-28T12:00:00"
]
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    tsega created an issue. See original summary.

    tsega’s picture

    Issue summary: View changes
    tsega’s picture

    tsega’s picture

    • tsega committed 69425ea on 3183105-support-date-range-data-type-update
      Issue #3183105 by tsega: Trim dates after exploding sting.
      

    • tsega committed 69425ea on 1.0.x
      Issue #3183105 by tsega: Trim dates after exploding sting.
      
    tsega’s picture

    Status: Active » Needs review
    tsega’s picture

    Status: Needs review » Reviewed & tested by the community
    tsega’s picture

    Status: Reviewed & tested by the community » Fixed
    tsega’s picture

    Status: Fixed » Closed (fixed)