Easy Tutorial
❮ Met Canvas Transform Prop Element Style ❯

Input DatetimeLocal value Attribute

Input DatetimeLocal Object

Example

Set the local date and time for the time field:


Definition and Usage

The value attribute is used to set or return the value of the value attribute of the local time field.

The value attribute describes the local date and time of the time field.


Browser Support

All major browsers support the value attribute.

Note: The <input type="datetime-local"> element is not supported by Internet Explorer or Firefox browsers.


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
YYYY-MM-DDThh:mm:ssTZD Describes the date and time. Breakdown as follows: YYYY - Year (e.g., 2011) MM - Month (e.g., 01 for January) DD - Day (e.g., 08) T - Separator if time is specified hh - Hour (e.g., 22 for 10.00pm) mm - Minute (e.g., 55) ss - Second (e.g., 03) TZD - Time zone indicator (Z stands for Zulu, also known as Greenwich Mean Time)

Technical Details

| Return Value: | String, representing the date and time of the local time field | | --- | --- |


More Examples

Example

Get the local date and time of the time field:


Related Pages

HTML Reference: HTML <input> value Attribute


❮ Met Canvas Transform Prop Element Style ❯