Issue Feature Closed

#38965Add support for native date/time fields

Xavier Perseguers 07/15/12, 16:38 updated 10/23/17, 22:12

Description

TYPO3 stores date and date/time values as a Unix timestamp. This feature allows native database types to be used instead.

Native fields must be marked as such in the TCA using the “xtype” key:

'native_date' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:test_nativedate/locallang_db.xml:tx_testnativedate_example.native_date',
    'config' => array(
        'xtype'    => 'date',
        'type'     => 'input',
        'size'     => '8',
        'max'      => '20',
        'eval'     => 'date',
        'checkbox' => '0',
        'default'  => '0'
    )
),

“xtype” can be one of following value:

  • date
  • datetime

and works for any “type” of field.

Reviews 1