Review main Merged

94073[BUGFIX] Properly parse dateTimeFirstDayOfWeek when not yet set

Garvin Hicking CR +2 V +2 Easy +2 −2 updated 05/12/26, 09:00

Commit message

After Feature #108463 ("User-specific configuration of
date-timepicker's first day of a week", introduced in 14.1),
the backend date-time picker renders a broken calendar grid
for any backend user whose `be_users.uc` does not contain a
dateTimeFirstDayOfWeek entry — which is the default state
for every user that hasn't opened the User Settings module
since the upgrade.

In the broken state, the calendar lays the days out sequentially
starting in the leftmost column: the 1st of every month appears
in column 0, the 2nd in column 1, etc., regardless of the actual
weekday. The week header is rendered correctly, so the
misalignment is immediately visible (e.g. December 1st
2026 is shown under "Sun" although it is a Tuesday).

This patch properly guards the `dow` variable to also catch
undefined/null values.

Thanks to Oliver Heins for reporting the bug and providing
a working fix.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Sebastian Iffland +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Josua Vogel +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 912

  1. Garvin Hicking uploaded patch set 1 05/12/26, 06:34

  2. core-ci voted on patch set 1 V +1 05/12/26, 06:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101861

  3. Oliver Klee updated the commit message in patch set 2 V +1 05/12/26, 07:09

  4. core-ci voted on patch set 2 V +1 05/12/26, 07:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101865

  5. Josua Vogel uploaded patch set 3 V +1 05/12/26, 07:37

  6. Josua Vogel commented on patch set 3 CR +1 V +1 05/12/26, 07:39

    I simplified the condition loose null-check (!= null) which covers undefined and null
  7. core-ci voted on patch set 3 V +1 05/12/26, 07:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101870

  8. Sebastian Iffland voted on patch set 3 CR +1 05/12/26, 07:53

  9. Oliver Hader commented on patch set 3 CR +1 V +1 05/12/26, 07:54

    date-time-picker.ts:76

    Implicit `undefined` check - however it seems to be fine to use the non-strict `!=` comparison here.
  10. Oliver Hader commented on patch set 3 05/12/26, 07:59

    date-time-picker.ts:76 Reply

    Besides that, I guess it can be simplified, since `dow` (from the settings) is from `1` to `7`. Thus, `if (dow > 0) {}` would be fine as well - wouldn't it?
  11. Oliver Hader voted on patch set 3 CR +2 V +2 05/12/26, 08:43

  12. Oliver Hader merged patch set 4 05/12/26, 09:00