Not providing a time in the "ProductAvailabilityDefaultWidget" will lead to a form validation error on save

Created on 17 June 2024, 11 days ago

Problem/Motivation

The logic of a datetime element is, that if a date and time is provided, we get an DrupalDateTime object. This is good. But if we do not provide a time we get an ugly array, which we need to convert back to a DrupalDateTime object. Doing so inside massageFormValues does work, but the validation error still appear on save.

Steps to reproduce

Proposed resolution

Make the time optional.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024