Problem/Motivation

Part 7 of splitting #3595219: 3.0 Exploration, and the follow-up to #3598994: Date/time field exposure (date/time field exposure). This issue handles submitting and validating date/time values, which is substantial enough to warrant its own change.

Problems in 3.x:

  • Submission input for datelist and date elements is not parsed/processed into the format Webform expects, so valid date submissions are rejected or stored incorrectly.
  • Multiple-value date elements (a #multiple date/datetime) cannot be submitted or validated correctly.

Proposed resolution

  • Parse and process datelist/date submission input in src/Plugin/GraphQL/DataProducer/WebformSubmit.php, converting the incoming values into what Webform's validation and storage expect.
  • Handle multiple date/datetime values, including validation of each value.

This depends on #3598994: Date/time field exposure because the test fixtures and exposed shape of the date elements are introduced there; keeping submission separate keeps both diffs reviewable.

Remaining tasks

  • Implement datelist/date input parsing in WebformSubmit.php.
  • Handle and validate multiple date/datetime values.
  • Tests: DatetimeExtrasTest, and mutation tests FormSubmissionDatelistTest, FormSubmissionMultiDatetimeTest, FormSubmissionDateFamilyValidationTest, plus shared test-form additions.

API changes

Additive/correctness: date, datelist and datetime submissions (single and multiple value) are now accepted and validated. No fields removed.

Release notes snippet

Date, datelist and datetime elements can now be submitted and validated through GraphQL, including multiple-value date fields.

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

pfrenssen created an issue. See original summary.

  • pfrenssen committed 6da51281 on 3.x
    feat: #3599000 Date/time submission
    
    By: dulnan
    By: pfrenssen
    
pfrenssen’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.