Project

General

Profile

Actions

Bug #97216

closed

Time value "midnight" (00:00) is not accepted

Added by Oliver Hader over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2022-03-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Having the following TCA configuration for a time field, allows to persist data via DataHandler, but then resets the value 00:00:00 to null in FormEngine.

'end_time' => [
  'exclude' => true,
  'label' => 'LLL:EXT:site/Resources/Private/Language/locallang_db.xlf:tx_site_domain_model_eventperformance.end_time',
  'config' => [
    'dbType' => 'time',
    'type' => 'input',
    'renderType' => 'inputDateTime',
    'size' => 12,
    'eval' => 'time,required',
    'default' => null,
  ],
],
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowDateTimeFields::addData
  • $result['databaseRow'][$column] = '00:00:00'
  • $dateTimeFormats[$columnConfig['config']['dbType']]['empty'] = '00:00:00'
  • resetting value to null, since the given (correct) value is considered "to be empty"


Files

97216_view.png (53.4 KB) 97216_view.png Oliver Hader, 2022-03-21 10:21
97216_formengine.png (1.18 MB) 97216_formengine.png Oliver Hader, 2022-03-21 10:21

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #98252: TCA Default value for times cannot be setClosed2022-09-02

Actions
Related to TYPO3 Core - Bug #99847: Null value for time field is ignored in BEClosed2023-02-06

Actions
Actions

Also available in: Atom PDF