Project

General

Profile

Actions

Bug #94647

closed

TCAdefaults are ignored for inputDateTime fields if lower range lies in future

Added by Georg Tiefenbrunn over 2 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2021-07-27
Due date:
% Done:

0%

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

Description

TYPO3 10.4.18 (composer)

# TCA
table
  columns
    test_date
      config
        eval = date
        range
          lower = {value greater than now}
        renderType = inputDateTime
        type = input

# TCAdefaults
TCAdefaults.table.test_date = {future date}

On creating new records:

  • OK: range.lower is not set -> TCAdefaults is used
  • OK: range.lower is smaller than now() -> TCAdefaults is used
  • ERROR: range.lower is greater than now() (is a future date) -> TCAdefaults are ignored and range.lower is used as element value.

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #91777: Date input fields always reset to lowest range when definedClosed2020-07-09

Actions
Related to TYPO3 Core - Bug #87524: lower range in datetime causes empty input fieldsClosed2019-01-23

Actions
Actions #1

Updated by Nikita Hovratov over 2 years ago

Is the range.lower value less than the TCAdefaults value in your example?

Actions #2

Updated by Georg Tiefenbrunn over 2 years ago

Nikita Hovratov wrote in #note-1:

Is the range.lower value less than the TCAdefaults value in your example?

Yes.

I initially defined range.lower, range.upper and TCAdefaults:

now = 2021-07-28 16:00:00
range.lower = 2021-07-29 (tomorrow)
range.upper = 2022-07-29 (+1 year)
TCAdefaults = 2022-07-29 (+1 year)

To narrow down the error I removed range.upper:

now = 2021-07-28 16:00:00
range.lower = 2021-07-29 00:00:00 (tomorrow; defined as INT)
TCAdefaults = 2022-07-29 (+1 year; set as STRING; see @eval = date@)

As long range.lower is less than now (range.lower = 2021-07-28 15:59:59) TCAdefaults are applied.
If range.lower is greater than now (range.lower = 2021-07-28 16:00:01; I didn't check if it's > or >=) TCAdefaults are ignored.

Actions #3

Updated by Nikita Hovratov over 2 years ago

  • Related to Bug #91777: Date input fields always reset to lowest range when defined added
Actions #4

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch 10.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/+/70167

Actions #5

Updated by Nikita Hovratov over 2 years ago

The culprit was the bootstrap datetime picker in the end. What a ride of debugging :)

Actions #6

Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch 10.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/+/70167

Actions #7

Updated by Nikita Hovratov over 2 years ago

  • Related to Bug #87524: lower range in datetime causes empty input fields added
Actions #8

Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch 10.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/+/70167

Actions #9

Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch 10.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/+/70167

Actions #10

Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch 10.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/+/70167

Actions #11

Updated by Gerrit Code Review over 2 years ago

Patch set 6 for branch 10.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/+/70167

Actions #12

Updated by Gerrit Code Review over 2 years ago

Patch set 7 for branch 10.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/+/70167

Actions #13

Updated by Gerrit Code Review over 2 years ago

Patch set 8 for branch 10.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/+/70167

Actions #14

Updated by Nikita Hovratov 10 months ago

  • Status changed from Under Review to Closed

Won't be fixed anymore for v10. Since TYPO3 v11 there is the flatpickr.

Actions

Also available in: Atom PDF