HTML DOM Input Datetime value property
Examples
Set the date and time datetime fields:
. Document.getElementById ( "myDatetime") value = "2014-01-02T11: 42Z";
try it"
Definition and Usage
value attribute is used to set the property value or return value datetime field.
value attribute describes the date and time datetime fields.
Browser Support
All major browsers support attribute value.
Note: Internet Explorer, Firefox, Opera 15 ( and higher) or Chrome supports the <input> element using type = "datetime".
grammar
Returns the value property:
datetimeObject .value
Set the value property:
datetimeObject .value = YYYY-MM-DDThh : mm: ssTZD
Property Value
value | description |
---|---|
YYYY-MM-DDThh: mm:ssTZD | It describes the date and time. Interpreted as follows:
|
technical details
return value: | String, indicating the date and time datetime fields |
---|
More examples
Examples
Get the date and time datetime fields:
var x = document.getElementById ( "myDatetime") value.;
x The output is: 2014-02-06T10: 57Z
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> value The property
Input Datetime Object