(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
===Name===
 +
month
 +
===Type===
 +
_input
 +
===Synopsis===
 +
How to render a month/year input field
 +
===Description===
 +
'''_input''' elements of type '''month''' create input fields that let the user enter a month and year allowing a month and year to be easily entered. The value is a string whose value is in the format "YYYY-MM", where YYYY is the four-digit year and MM is the month number.
 +
===Parameters===
 +
type="month"
  
 +
All other valid parameters for an input field are valid. Additionally you can use min, max, step and list.
 +
===Example===
 +
<syntaxhighlight lang="html">
 +
<_label for="bday-month">What month were you born in?</_label>
 +
  <_input id="bday-month" type="month" name="bday-month" />
 +
</syntaxhighlight>
 +
<_label for="bday-month">What month were you born in?</_label>
 +
  <_input id="bday-month" type="month" name="bday-month" />
 +
===Note===
 +
When not a correct month is entered, the browser will fallback to a text-input field. Read the link below how to handle these situations.
 +
 +
Also note that not all browsers support the month attribute.
 +
===Links===
 +
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month
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 month/year input field
 +
}}
ws-page-props
Line 1: Line 1:
{{Doc properties
+
 
|Subject version=1.0.0
 
|Doc subject=DevOps:Doc/FlexForm
 
}}
 

Latest revision as of 13:56, 22 September 2022

Name

month

Type

_input

Synopsis

How to render a month/year input field

Description

_input elements of type month create input fields that let the user enter a month and year allowing a month and year to be easily entered. The value is a string whose value is in the format "YYYY-MM", where YYYY is the four-digit year and MM is the month number.

Parameters

type="month"

All other valid parameters for an input field are valid. Additionally you can use min, max, step and list.

Example

<_label for="bday-month">What month were you born in?</_label>
  <_input id="bday-month" type="month" name="bday-month" />

 

Note

When not a correct month is entered, the browser will fallback to a text-input field. Read the link below how to handle these situations.

Also note that not all browsers support the month attribute.

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month