Project

General

Profile

Actions

Bug #14303

closed

datetime broken with picker

Added by Nicola Chiapolini almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Enis Nuredini
Target version:
Start date:
10.06.2022
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
No
Vote:

Description

We do have a lot of SQL date and datetime fields in our database, the corresponding forms use date and datetime form-elements.
Extension config: config.dateFormat = yyyy-mm-dd, so all input is YYYY-MM-DD and YYYY-MM-DD HH:mm respectively

When adding the relevant CSS and JS files, these fields are all broken.

Without manual intervention:
  • the fields only show datepicker even for datetime fields
  • existing dates and newly selected dates end up like 2022-37-Fr (when selecting 2022-06-10 or if the record in the DB contains that date)
Adding
dateFormat = YYYY-MM-DD HH:mm
datetimeSideBySide = true
to FormElement.parameter of a datetime field:
  • date and time picker are shown correctly
  • datetime picked is displayed correctly
  • datetime is stored correctly
  • stored values from the record are not shown anymore, instead the filed is displayed as if empty
Wishes:
  • stored values should be loaded correctly
  • the default dateFormat should respect the global config (an not require a manual intervention on every single date or datetime field.)
  • datetimeSideBySide should be true for datetime fields

Further minor wish: When the first field in a form is a date or datetime field, the picker is only opened after it looses and regains focus. It would be nice if the picker was opened on load directly. (but this is probably a Browser-Javascript problem.)


Related issues

Related to QFQ - Feature #12630: Input: date[time]: min / max valuesClosedCarsten Rose27.05.2022

Actions
Actions #1

Updated by Carsten Rose almost 2 years ago

  • Related to Feature #12630: Input: date[time]: min / max values added
Actions #2

Updated by Enis Nuredini almost 2 years ago

  • Assignee changed from Carsten Rose to Enis Nuredini
Actions #3

Updated by Enis Nuredini almost 2 years ago

  • Status changed from New to ToDo
Actions #4

Updated by Carsten Rose almost 2 years ago

  • Target version changed from next3 to 355
Actions #5

Updated by Enis Nuredini almost 2 years ago

  • Status changed from ToDo to In Progress
Actions #6

Updated by Enis Nuredini almost 2 years ago

  • Status changed from In Progress to Closed
Actions #7

Updated by Carsten Rose over 1 year ago

  • Target version changed from 355 to 22.8.0
Actions #8

Updated by Carsten Rose over 1 year ago

  • Status changed from Closed to Feedback
  • Target version changed from 22.8.0 to 355
  • Prio Planung set to No

@Enis: Nicola hat eine Menge Punkte angemerkt - hast du die alle getestet?

Wenn ja: bitte zu jedem Punkt hier im Ticket Stellung nehmen und reinschreiben das es gefixt ist oder warum nicht. Wenn man das pro Punkt macht, und serioes macht, hilft es das man nichts uebersieht.

Wenn nein: bitte fixen (wo sinnvoll, sonst reinschreiben warum nicht).

Vielen Dank.

Actions #9

Updated by Enis Nuredini over 1 year ago

Without manual intervention:

the fields only show datepicker even for datetime fields
existing dates and newly selected dates end up like 2022-37-Fr (when selecting 2022-06-10 or if the record in the DB contains that date)

Adding
dateFormat = YYYY-MM-DD HH:mm
datetimeSideBySide = true
to FormElement.parameter of a datetime field:

date and time picker are shown correctly
datetime picked is displayed correctly
datetime is stored correctly
stored values from the record are not shown anymore, instead the filed is displayed as if empty

Wishes:

stored values should be loaded correctly
Fehler bei verschiedenen Konstellationen wurden behoben.

the default dateFormat should respect the global config (an not require a manual intervention on every single date or datetime field.)
Falls nichts im FE.parameter angegeben dann wird der default vom qfq config verwendet. In der Config wird als Vereinfachung die Schreibweise yyyy-mm-dd oder dd.mm.yyyy akzeptiert (In QFQ wird dann diese Eingabe direkt als YYYY-MM-DD oder DD.MM.YYYY intepretiert, weil so vom datetimepicker gebraucht.)

datetimeSideBySide should be true for datetime fields
Der integrierte datetimepicker ermöglicht es nicht den Clear-Button anzuzeigen wenn datetimeSideBySide aktiv ist. Da clearMe öfters verwendet wird ist datetimeSideBySide per default deaktiviert, kann jedoch normal über Parameter aktiv gestellt werden.

Further minor wish: When the first field in a form is a date or datetime field, the picker is only opened after it looses and regains focus. It would be nice if the picker was opened on load directly. (but this is probably a Browser-Javascript problem.)
In der neuen Version reicht ein einfacher Klick auf das Element. Fokus muss nicht verlassen werden. Zum automatischen Öffnen des Datetimepickers beim Laden: Mit Carsten angeschaut und Funktion für nicht angenehm und störend empfunden, weshalb auf diese Funktion verzichtet wird.

Alle Anpassungen werden mit der nächsten QFQ Version aktiv

Actions #10

Updated by Nicola Chiapolini over 1 year ago

Vielen Dank für die Info, tönt sehr vielversprechend. Teste ich gerne bei Gelegenheit. - Die QFQ-Releasenotes deuten darauf hin, dass das schon in 22.9.2 ist, hier steht 22.10.0; was ist korrekt?

Actions #11

Updated by Enis Nuredini over 1 year ago

Es wurde mir heute Morgen schon für die Version 22.9.2 bestätigt.

Actions #12

Updated by Enis Nuredini over 1 year ago

  • Status changed from Feedback to Closed
Actions #13

Updated by Carsten Rose over 1 year ago

  • Target version changed from 355 to 24.10.0
Actions #14

Updated by Carsten Rose over 1 year ago

  • Target version changed from 24.10.0 to 22.12.0
Actions

Also available in: Atom PDF