Bug #53640

js validation for datetime + required doesn't work for below 1970

Added by Georg Ringer almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2013-11-14
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If an input field got as eval "datetime,required", the validation fails as soon as the given date is below 1970.

if the required is removed, everything is fine.

As an example: use ext:news and the datetime field.

        'datetime' => array(
            'exclude' => 0,
            'l10n_mode' => 'mergeIfNotBlank',
            'label' => $ll . 'tx_news_domain_model_news.datetime',
            'config' => array(
                'type' => 'input',
                'size' => 12,
                'max' => 20,
                'eval' => 'datetime',
                'default' => mktime(date('H'), date('i'), 0, date('m'), date('d'), date('Y'))
            )
        ),

tested in master but should be testable in any supported branch


Related issues

Related to TYPO3 Core - Feature #61110: Support for timezones in all date fields in TYPO3 BE New 2014-08-21
Related to TYPO3 Core - Bug #21838: Date field on TCA can't accept 1-1-1970 as Closed 2009-12-10
Related to TYPO3 Core - Bug #37244: TCA date evaluation for dates lower 01-01-1970 fails Accepted 2012-05-17

History

#1 Updated by Vasyl Mosiychuk almost 6 years ago

  • Assignee set to Georg Ringer

Where should I put this code?

#2 Updated by Georg Ringer almost 6 years ago

in the TCA or just check out ext news

#3 Updated by Mathias Schreiber over 4 years ago

  • Status changed from New to Closed

will continue in #37244, this thing is WIP (finally) :)

Also available in: Atom PDF