Issue Bug Closed

#111215Datetime fields with allowLanguageSynchronization stay disabled after switching to "Custom value"

Thorsten Schramm 10/23/26, 12:11 updated 11/19/26, 17:25

Description

Problem

In a translated record, a field of type datetime with 'behaviour' => ['allowLanguageSynchronization' => true] cannot be edited after switching the localization state from “Value of default language” to “Custom value”. The date input stays greyed out. This affects e.g. pages.starttime and pages.endtime of translated pages for all users, including admins.

Workaround for editors: select “Custom value”, save the record, then the field is editable after reload.

Steps to reproduce

  1. Create a page in the default language and translate it.
  2. Edit the translated page, open tab “Access”.
  3. “Start” is set to “Value of default language” and is disabled (correct).
  4. Select “Custom value” for “Start”.

Expected: the date field becomes editable.
*Actual:* the date field stays disabled.

Cause

LocalizationStateSelector (backend/form-engine/field-wizard/localization-state-selector.ts) toggles disabled only on the first element with [data-formengine-input-name] in the field item. For datetime fields this is the original input that flatpickr turns into a hidden input. The visible input is flatpickr’s altInput ([data-formengine-datepicker-real-input-name]), which is neither enabled/disabled nor updated with the new value.

Related problem: raw timestamp as original language value

LocalizationStateSelector.php writes the raw database value of the default language row into data-original-language-value (e.g. 1766530860). When switching back to “Value of default language”, the TypeScript sets this raw timestamp as input value and dispatches change. FormEngineValidation then throws:

Error: Invalid ISO8601 DateTime string: 1766530860
    at FormEngineValidation.formatValue

As a result the submitted hidden field is not updated. When switching to “Custom value” again (which starts with the default language value), the displayed date and the submitted value can differ.

Suggested fix

  • TypeScript: after changing input.disabled / input.value, sync the flatpickr instance (input._flatpickr): set altInput.disabled and call setDate() / clear() with the new value.
  • PHP: for datetime fields, render data-original-language-value in the same ISO 8601 format the datetime element uses for its own value, instead of the raw timestamp. That avoids the validation error and keeps the server’s time zone handling (converting the timestamp in the browser would use the browser’s time zone).

Environment

  • Reproduced on TYPO3 14.3.8 and 12.4.50 (ELTS), Chromium.
  • The relevant code is unchanged in 13.4, 14.3 and main: localization-state-selector.ts only toggles the first [data-formengine-input-name], the datetime picker still uses flatpickr with altInput: true, and LocalizationStateSelector.php still renders the raw database value into data-original-language-value.

Reviews 1

History 3

  1. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-19T17:25:03+00:00" > 11/19/26, 17:25 </span>

    Closing as a duplicate of #107024