HTML and CSS Reference
In-Depth Information
2.2.5. Using the form input type month and input attribute pattern
The Payment Details section of the form asks users to enter their credit card details—the
name on the card, the card number, the expiry date, and the CVV2 security code, found
on the back of most cards. These fields use some of the HTML5 form features introduced
in the Contact Details section: required and placeholder input attributes. The Pay-
ment Details section also uses some new features: the pattern input attribute and the
month input type.
The month input type
month input type
The month type allows the user to select a month and year combination from a date-picker
widget. HTML5 defines a number of date-related types: date , datetime , datetime-
local , month , week , and time . Browser support for these widgets and validation has
been slow moving—with the exception of Opera, which has had good support for these
types for quite some time, albeit with an ugly date-picker widget, as shown in figure 2.7 .
Search WWH ::

Custom Search