Actions
Bug #102602
closedTime input does not initialize 00:00 properly
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2023-12-04
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
The time input does not properly load the time 00:00. When the field is required, it is marked as error after reloading the record.
This prevents a valid record to be saved.
Steps to reproduce¶
- Create record in the backend
- Set time to
00:00
- Save form
Results¶
- Expected result: Input has the time
00:00
- Actual result: the input is unset and the input field has an error (since required)
TCA¶
'columns' => [
'mytime' => [
'label' => 'mytime',
'config' => [
'type' => 'datetime',
'format' => 'time',
'default' => 0,
'required' => true,
'nullable' => false,
],
],
],
Cause¶
This bug was introduced in TYPO3 v12. In previous version, the time was set to 00:00.
It was introduced by the change https://review.typo3.org/c/Packages/TYPO3.CMS/+/79793
Possible fixes¶
This bug could be fixed in one of these places by removing the equals 0 checks
a) Form/Element/DatetimeElement
b) TypeScript/backend/form-engine-validation.ts
I think the better place is a), since all times are then returned as 1970-01-01T00:00:00Z
. Whereas now, 0 is the exception.
Files
Actions