Issue Bug Closed

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

NGUYEN Duc Quan 08/30/18, 14:44 updated 05/13/19, 10:40

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'),
                ],
            ],
        ],

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.