Bug #87524
closedlower range in datetime causes empty input fields
0%
Description
When i open records which have date fields that are lower than defined in the range, the input field gets emptied instead of just showing that a validator is violated.
Here my TCA config
'starttime' => array( 'exclude' => 1, 'l10n_mode' => 'mergeIfNotBlank', 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', 'config' => array( 'type' => 'input', 'size' => 13, 'max' => 20, 'eval' => 'datetime,required', 'checkbox' => 0, 'default' => 0, 'range' => array( 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ), ), ),
Updated by David Aichinger almost 6 years ago
Additional Info: I updated from 8.7.22 to 8.7.24. This behaviour wasn't there in 8.7.22
Updated by Riccardo De Contardi over 4 years ago
I tried with 9.5.15 and
'eval' => 'datetime,required', 'range' => array( 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) ),
(BTW: what should 'checkbox' => 0,
do?)
and I found that
- the "required" validation seems to work, but it does not say that the field is required
- the datepicker does not let me select a date prior than the current date (today)
- if I try to write a date in the past (yesterday), when saved it is reverted to today
Updated by Georg Tiefenbrunn over 3 years ago
- Subject changed from 8.7.24 lower range in datetime causes empty input fields to lower range in datetime causes empty input fields
Still present in TYPO3 10.4.18
- Invalid (outdated) valued are first rendered inside the form element and are stored in the hidden input fields but get cleared by JavaScript.
- "required" validation is not executed, the field is not marked as error
Updated by Georg Tiefenbrunn over 3 years ago
the field is not marked as error
value
is not transformed to integer in JS function FormEngineValidation.validateField()
and thus the condition if (!isNaN(minValue) && value < minValue)
will never match for date/dateTime strings.
Updated by Nikita Hovratov over 3 years ago
- Related to Bug #94647: TCAdefaults are ignored for inputDateTime fields if lower range lies in future added
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review over 3 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
Updated by Gerrit Code Review about 3 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
Updated by Gerrit Code Review almost 3 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
Updated by Nikita Hovratov over 1 year ago
- Status changed from Under Review to Closed
Won't be fixed anymore for v10. Since TYPO3 v11 there is the flatpickr.