(Admin) |
m (→) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | ===Name=== | ||
+ | date | ||
+ | ===Type=== | ||
+ | _input | ||
+ | ===Synopsis=== | ||
+ | How to render a date input field | ||
+ | ===Description=== | ||
+ | _input elements of type="date" create input fields that let the user enter a date, either with a textbox that validates the input or a special date picker interface. | ||
+ | The resulting value includes the year, month, and day, but not the time. | ||
+ | |||
+ | The date is formatted according to ISO8601, described in Format of a valid date string in Date and time formats used in HTML. | ||
+ | ===Parameters=== | ||
+ | type="date" | ||
+ | |||
+ | All other valid parameters for an input field are valid. Additionally you can use min, max and step. | ||
+ | ===Example=== | ||
+ | <syntaxhighlight lang="html"> | ||
+ | <_input type="date" name="date" value="2022-03-01" min="2022-01-01" max="2022-12-31" /> | ||
+ | </syntaxhighlight> | ||
+ | <_input type="date" name="date" value="2022-03-01" min="2022-01-01" max="2022-12-31" /> | ||
+ | ===Note=== | ||
+ | When an incorrect date is entered, the browser will fall back to a text-input field. Read the link below how to handle these situations. | ||
+ | |||
+ | ===Links=== | ||
+ | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date | ||
ws-class-props | |||
---|---|---|---|
Line 1: | Line 1: | ||
− | + | {{Doc properties | |
+ | |Doc subject=DevOps:Doc/FlexForm | ||
+ | |Subject version=1.0,1.1 | ||
+ | |Doc parent=DevOps:Doc/FlexForm/1.0/input | ||
+ | |Doc sort order=110 | ||
+ | |Doc target group=User | ||
+ | |Doc synopsis=How to render a date input field | ||
+ | }} | ||
ws-page-props | |||
Line 1: | Line 1: | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 12:37, 9 December 2022
Name
date
Type
_input
Synopsis
How to render a date input field
Description
_input elements of type="date" create input fields that let the user enter a date, either with a textbox that validates the input or a special date picker interface.
The resulting value includes the year, month, and day, but not the time.
The date is formatted according to ISO8601, described in Format of a valid date string in Date and time formats used in HTML.
Parameters
type="date"
All other valid parameters for an input field are valid. Additionally you can use min, max and step.
Example
<_input type="date" name="date" value="2022-03-01" min="2022-01-01" max="2022-12-31" />
Note
When an incorrect date is entered, the browser will fall back to a text-input field. Read the link below how to handle these situations.
Links
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date