Problem with date Field
We have discovered one bug with date field
birthday date DEFAULT '0000-00-00',
'birthday' => array(
'exclude' => 1,
'label' => 'Birthday',
'config' => array(
'dbType' => 'date',
'type' => 'input',
'size' => 7,
'eval' => 'date',
'checkbox' => 0,
'default' => '0000-00-00'
if the date in the field is bigger then 1.1.1970 all works fine. But if the date ist lower for example 1.1.1969. This happens:
- FE shows 1.1.1969 - OK
- BE list-view shows 1.1.1969 - OK
but if the record is open for editing the field is filled with date -1 DAY - in this case the date 31.12.1968
Updated by Daniel Maier over 5 years ago
- Status changed from New to Accepted
Conversion from Date to Timestamp and back does not work correct in this case (first conversion (on php-side) is done with configured phpTimeZone, the second one (on js-side) with UTC).
Can be reproduced using input_36 of styleguide-extension. Select a date lower to 1970 here (e.g. 31-12-1969). Each time the form is saved, the date is reduced by one day (e.g. 30-12-1969, next 29-12-1969, next 28-12-1969, and so on).
If date is set to 01-01-1970, no value is shown in the FormEngine.