Datetime element validation fails when used in a table

Created on 11 April 2016, over 8 years ago
Updated 12 May 2023, over 1 year ago

Field validation fails when a datetime object is used within a table.

// works
$form['foo'] = [
  '#title' => $this->t('Foo'),
  '#type' => 'datetime',
];
$form['sleep']['days'] = [
  '#type' => 'table',
  '#header' => ['#markup' => 'Header']
];
// fails
$form['sleep']['days']['bar'] = [
  '#title' => $this->t('Bar'),
  '#type' => 'datetime',
];
🐛 Bug report
Status

Needs work

Version

9.5

Component
Form 

Last updated about 8 hours ago

Created by

🇦🇺Australia dpi Perth, Australia

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024