Project

General

Profile

Actions

Bug #86038

closed

TCA inputDateTime range with stored datetime earlier than lower datetime gets cleared

Added by NGUYEN Duc Quan about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2018-08-30
Due date:
% Done:

0%

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

Description

Hi, when I open a custom event record with a "inputDateTime" render type which has a date earlier than the lower date limit (defined in the TCA range definition) then the date flashes up and gets instantly cleared.

When removing the range definition from the TCA then the date stays visible and doesn't get cleared. I replicated this issue on two different typo3 installations.

I assume that there is an issue with the javascript part with checks if the datetime meets the contraints, here not earlier than the lower datetime define in the TCA range.

I have the following setup:

ext_tables.sql:

evstartdate                VARCHAR(255) DEFAULT ''        NOT NULL,
evenddate                VARCHAR(255) DEFAULT ''        NOT NULL,

TCA:

        'evstartdate' => [
            'exclude' => 1,
            'label'   => 'LLL:EXT:myextension/Resources/Private/Language/locallang.xlf:db.tx_myextension_domain_model_event.startdate',
            'config'  => [
                'type'       => 'input',
                'renderType' => 'inputDateTime',
                'eval'       => 'datetime,required',
                'range'      => [
                    'lower' => strtotime('today 00:00'),
                ],
            ],
        ],
        'evenddate'   => [
            'exclude' => 1,
            'label'   => 'LLL:EXT:myextension/Resources/Private/Language/locallang.xlf:db.tx_myextension_domain_model_event.enddate',
            'config'  => [
                'type'       => 'input',
                'renderType' => 'inputDateTime',
                'eval'       => 'datetime,required',
                'range'      => [
                    'lower' => strtotime('now'),
                ],
            ],
        ],


Files

inputDatetime.mov (336 KB) inputDatetime.mov NGUYEN Duc Quan, 2018-08-30 14:44
Actions

Also available in: Atom PDF