#102070Validation and UX errors on TCA type=datetime when using range property
Description
Use the following TCA type datetime to reproduce:
'date_column' => [
'label' => 'date_column',
'config' => [
'type' => 'datetime',
'format' => 'date',
'default' => 0,
'range' => [
'lower' => 1693526400,
'upper' => 1693699200,
],
],
],
lower = 1693526400 = 2023-09-01 (Fri Sep 01 2023 00:00:00 GMT+0000) upper = 1693699200 = 2023-09-03 (Sun Sep 03 2023 00:00:00 GMT+0000)
Date 2023-09-02 (input value 02-09-2023 in BE form field) should be valid for each range combinations (both range.lower and range.upper or only one of them). The following errors also occur using 'format' => 'datetime'.
As soon as range.lower is used (both used alone or in combination with range.upper), all inputs are reported invalid (JS, form can’t be saved).
If only range.upper is used …
- record can be saved
- there is no JS validation
- invalid values (e.g.
04-09-2023) will be converted to the given upper limit30-09-2023ignoring its time (the current time is used).
As an integrator …
- I expect the BE to properly validate user input as defined in TCA
- I expect server side transformation of user input to be stored with the given min/max time (not a weird mix of current and min/max datetime)
As an editor …
- I expect invalid dates being disabled in the date picker
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 2
History 4
-
Georg Tiefenbrunn changed Related to #101254 <span data-processor="relativetime" data-value="2023-09-29T13:57:16+00:00" > 09/29/23, 13:57 </span>
-
Benjamin Franzke changed parent task #77562 <span data-processor="relativetime" data-value="2025-03-20T13:10:24+00:00" > 03/20/25, 13:10 </span>
-
Benni Mack changed Related to #105430 <span data-processor="relativetime" data-value="2026-11-13T11:59:04+00:00" > 11/13/26, 11:59 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-13T13:21:46+00:00" > 11/13/26, 13:21 </span>
Fixed with #105430