Input Week type Attribute

Definition and Usage

type The attribute returns the type of the form element for the week field.

Note:In the following example, Opera, Chrome, and Safari return "week", while Internet Explorer and Firefox return "text".

Example

The returned form element type of the week field is:

var x = document.getElementById("myWeek").type;

Try It Yourself

Syntax

weekObject.type

Technical Details

Return Value: A string value representing the form element type for the week field.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support

Note:The <input type="week"> element does not display any date field/calendar in Firefox.