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

Created on 17 June 2024, 10 months ago
Updated 13 August 2024, 9 months 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

Version

1.0

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.71.5 2024