Problem/Motivation
Part 6 of splitting #3595219: 3.0 Exploration. This issue exposes the configuration of the date and time element family (date, time, datetime, datelist) for querying. Submission parsing/validation for these elements is intentionally split into a follow-up (part 7) to keep each piece reviewable.
Missing in 3.x:
time:min,max,step.date: the date-specific configuration fields and the default value.datelist/datetime: which date/time parts are shown, the part order, and the per-part title display.
Proposed resolution
- Expose
timemin/max/step. - Expose the date element fields and resolve its default value correctly (building on the default-value producer from #3598935: Improve cacheability and rendering).
- Expose the datelist/datetime fields, backed by new enums for the date parts and their title display:
WebformDatePart,WebformDatePartTitleDisplay,WebformDatetimeDateElement,WebformDatetimeTimeElement.
This is read-only field exposure via WebformElementMetadata.php and the schema builder; no submission logic changes here.
Remaining tasks
- Add enums
WebformDatePart,WebformDatePartTitleDisplay,WebformDatetimeDateElement,WebformDatetimeTimeElementundersrc/Enum/; wire intoWebformSchemaBuilder.php. - Expose time/date/datelist fields in
WebformElementMetadata.phpandWebformExtension.php; resolve the date default value. - Tests:
TimeTest,DateBasedElementsTest,DateExtrasTest,DatelistTest, plus thetime.gql/datelist.gql/datetime_extras.gqlfixtures and shared test-form additions.
API changes
Additive: new fields on time / date / datelist / datetime elements and the supporting date-part enums. No fields removed.
Release notes snippet
Date and time elements now expose their configuration — time min/max/step, date fields and default value, and the datelist/datetime parts, order and per-part title display.
Issue fork graphql_webform-3598994
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
Comment #4
pfrenssen