RobinJ RobinJ - 1 year ago 82
HTML Question

Input type DateTime - Value format?

In which format should I put the date and time, for use in the HTML5 input element with DateTime type?

I have tried:

  • 1338575502

  • 01/06/2012 19:31

  • 01/06/2012 19:21:00

  • 2012-06-01

  • 2012-06-01 19:31

  • 2012-06-01 19:31:00

None of them seem to work.

Answer Source

For <input type="datetime" value="" ...

A string representing a global date and time.

Value: A valid date-time as defined in [RFC 3339], with these additional qualifications:

•the literal letters T and Z in the date/time syntax must always be uppercase

•the date-fullyear production is instead defined as four or more digits representing a number greater than 0




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download