You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/05/11 12:44:17 UTC
(tooling-trusted-releases) 05/07: #912/#914 - revert to date field for cycle dates
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 6efe23758f91c923a48ac2a9a0561a579abb65ea
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Mon May 11 09:16:16 2026 +0100
#912/#914 - revert to date field for cycle dates
---
atr/form.py | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/atr/form.py b/atr/form.py
index bb333a04..c9f4194e 100644
--- a/atr/form.py
+++ b/atr/form.py
@@ -1020,17 +1020,7 @@ def _render_widget( # noqa: C901
widget = htm.div[f"Custom widget for {field_name} not provided"]
case Widget.DATE:
- # Plain text input with YYYY-MM-DD format rather than `type="date"`
- # because the native picker displays in browser-locale order, which
- # is inconsistent for international users. Pattern enforces shape
- # client-side; pydantic parses on submit.
- attrs = {
- **base_attrs,
- "type": "text",
- "placeholder": "YYYY-MM-DD",
- "pattern": r"\d{4}-\d{2}-\d{2}",
- "inputmode": "numeric",
- }
+ attrs = {**base_attrs, "type": "date"}
if isinstance(field_value, datetime.date):
attrs["value"] = field_value.isoformat()
elif field_value:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org