Easy Tutorial
❮ Prop Option Form Jsref Setutchours ❯

Input Datetime type Attribute

Input Datetime Object

Example

Returns the form element type of the datetime field:

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

x output value is:

datetime

Definition and Usage

The type attribute returns the form type of the datetime field.

Note: In the above example, Safari and Opera 12 (and earlier versions) browsers return "datetime", while Opera 15 (and later versions), Internet Explorer, Firefox, and Chrome browsers return "text".


Browser Support

All major browsers support the type attribute.

Note: In the above example, Internet Explorer, Firefox, Opera version 15 (and later versions), or Chrome browsers do not support the <input type="datetime"> element.


Syntax

Technical Details

| Return Value: | String, representing the form element type of the datetime field | | --- | --- |

❮ Prop Option Form Jsref Setutchours ❯