Project

General

Profile

Actions

Bug #92935

closed

Datepicker flatpickr does not allow 01-01-1970 as input

Added by Imko Schumacher almost 4 years ago. Updated 5 months ago.

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

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
datepicker, flatpickr, 01-01-1970
Complexity:
Is Regression:
Sprint Focus:

Description

The new datepicker (Task #91606) does not allow to input 01-01-1970 or 00:00 01-01-1970 (start of unix epoch).

Requirements

  • current master (e.g. e3746d4454f978bb18065d9d838cbcaee4c0b49d)

Steps to reproduce

TCA with datepicker:

'a' => [
    'config' => [
        'type' => 'input',
        'renderType' => 'inputDateTime',
        'eval' => 'datetime',
    ],
],
'b' => [
    'config' => [
        'type' => 'input',
        'renderType' => 'inputDateTime',
        'eval' => 'date',
    ],
],
Steps:
  1. Try to input / select 00:00 01-01-1970 and 01-01-1970
  2. Click outside of the input

Actual result

  • input value gets removed and input is empty -> not able to submit the form with these values

Expected result

  • value should not get removed / stay as other values

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #91606: Replace bootstrap-datetime pickerClosedAndreas Kienast2020-06-08

Actions
Actions #1

Updated by Imko Schumacher almost 4 years ago

  • Related to Task #91606: Replace bootstrap-datetime picker added
Actions #2

Updated by Riccardo De Contardi almost 4 years ago

Is this one related to (or even a duplicate of) #92900 ?

Actions #3

Updated by Imko Schumacher almost 4 years ago

Riccardo De Contardi wrote in #note-2:

Is this one related to (or even a duplicate of) #92900 ?

No, since this is the new datepicker (Javascript / Client) and the other one is in the processing of TCA (Server) on native datetimes (also exists in older versions).
This date is just error prone, because it is the start of the unix epoch and often represented as 0.
I created both of them and only notice this after testing the other on the current master.

Actions #4

Updated by Benni Mack 5 months ago

  • Status changed from New to Closed

IMHO this is only possible if you use dbType=datetime, which I suggest you use for this kind of transaction.

Background: Technically, TYPO3 cannot distinguish between integer "0" and "not set" for integer / timestamp based fields.

I have tried this in TYPO3 v12 just now, and the value stays until it is persisted in the DB (where it says "0"). The original datepickr issue however is solved in latest v12 installations.

Actions #5

Updated by Benni Mack 5 months ago

And @Imko Schumacher - THANKS for your recent patches in that area in the past months!

Actions

Also available in: Atom PDF