Bug #94647
closed
TCAdefaults are ignored for inputDateTime fields if lower range lies in future
Added by Georg Tiefenbrunn over 3 years ago.
Updated over 1 year ago.
Category:
FormEngine aka TCEforms
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.
Is the range.lower value less than the TCAdefaults value in your example?
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.
- Related to Bug #91777: Date input fields always reset to lowest range when defined added
- Status changed from New to Under Review
The culprit was the bootstrap datetime picker in the end. What a ride of debugging :)
- Related to Bug #87524: lower range in datetime causes empty input fields added
- Status changed from Under Review to Closed
Won't be fixed anymore for v10. Since TYPO3 v11 there is the flatpickr.
Also available in: Atom
PDF