Project

General

Profile

Actions

Bug #102602

closed

Time input does not initialize 00:00 properly

Added by Imko Schumacher 7 months ago. Updated 14 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
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

  1. Create record in the backend
  2. Set time to 00:00
  3. 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

time-after-save.png (1.96 KB) time-after-save.png Imko Schumacher, 2023-12-04 19:28
set-time-0000.png (1.79 KB) set-time-0000.png Imko Schumacher, 2023-12-04 19:28

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #101258: FormEngine date field doesn't accept 00:00 01-01-1970Resolved2023-07-06

Actions
Actions #1

Updated by Imko Schumacher 7 months ago

  • Related to Bug #101258: FormEngine date field doesn't accept 00:00 01-01-1970 added
Actions #2

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #3

Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #4

Updated by Gerrit Code Review 2 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #5

Updated by Gerrit Code Review 2 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #6

Updated by Gerrit Code Review 2 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #7

Updated by Gerrit Code Review 2 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #8

Updated by Gerrit Code Review about 2 months ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #9

Updated by Gerrit Code Review about 2 months ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #10

Updated by Gerrit Code Review 14 days ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82093

Actions #11

Updated by Gerrit Code Review 14 days ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84459

Actions #12

Updated by Gerrit Code Review 14 days ago

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84459

Actions #13

Updated by Imko Schumacher 14 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF