This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 22331deddc WW-5778 docs: document datetextfield in the html5 theme
22331deddc is described below

commit 22331deddcd6b87fd0b088dabfe4eaa3fd424fad
Author: Lukasz Lenart <[email protected]>
AuthorDate: Sat Oct 24 15:11:17 2026 +0200

    WW-5778 docs: document datetextfield in the html5 theme
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 source/tag-developers/datetextfield-tag.md | 23 +++++++++++++++++++++++
 source/tag-developers/html5-theme.md       |  2 +-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/source/tag-developers/datetextfield-tag.md 
b/source/tag-developers/datetextfield-tag.md
index efe4c283ad..771432cc0a 100644
--- a/source/tag-developers/datetextfield-tag.md
+++ b/source/tag-developers/datetextfield-tag.md
@@ -19,3 +19,26 @@ Please make sure you have read the [Tag Syntax](tag-syntax) 
document and underst
 {% remote_file_content 
https://raw.githubusercontent.com/apache/struts/main/core/src/site/resources/tags/datetextfield-attributes.html
 %}
 
 ## Examples
+
+With the [html5 theme](html5-theme) (since 7.5.0) the tag renders a single 
native date input. The browser shows the
+date in the user's locale and always submits it as `yyyy-MM-dd`, so the 
`format` attribute is ignored:
+
+```jsp
+<s:datetextfield name="birthday" theme="html5" min="1900-01-01" 
max="2026-12-31"/>
+```
+
+```html
+<input type="date" name="birthday" value="1990-05-17" id="birthday" 
min="1900-01-01" max="2026-12-31"/>
+```
+
+- The property must be a `java.util.Date`; its value is rendered in the 
server's default time zone
+- `min` and `max` are passed through as dynamic attributes and must be written 
as `yyyy-MM-dd`
+
+With the [JavaTemplates Plugin](../plugins/javatemplates/) the tag renders one 
text input per date field, laid out
+by the `format` attribute, and `DateTextFieldInterceptor` assembles them back 
into a `java.util.Date`:
+
+```jsp
+<s:datetextfield name="birthday" format="dd/MM/yyyy"/>
+```
+
+The simple, xhtml and css_xhtml themes do not support this tag.
diff --git a/source/tag-developers/html5-theme.md 
b/source/tag-developers/html5-theme.md
index 896d616f1d..6b9cbbdc5e 100644
--- a/source/tag-developers/html5-theme.md
+++ b/source/tag-developers/html5-theme.md
@@ -56,7 +56,7 @@ Or globally in `struts.xml`:
 
 The HTML5 theme includes templates for all standard Struts UI tags including:
 textfield, textarea, password, checkbox, checkboxlist, radio, select, file,
-hidden, label, combobox, reset, submit, form, and more.
+hidden, label, combobox, datetextfield, reset, submit, form, and more.
 
 ## Text Field Template Example
 

Reply via email to