The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

6. December 2011, 14:10:49

DCA

Posts: 78

HTML5 / datetime

I'd like to use datetime for an admin form. How would I make a date-time display in a datetime input field?

<input type="datetime" name="indt" id="indt" value="2011-12-06 15:05:30" /> doesn't work
<input type="datetime" name="indt" id="indt" value="2011-12-06T15:05:30TZD" /> doesn't work

Thanks

8. December 2011, 20:58:09 (edited)

admiringworm

Posts: 1

Hello, I myself just figured out how to set the value in a datetime input.
The correct formatting seems to be:
<input type="datetime" name="indt" id="indt" value="2011-12-06T15:05Z" />

That's what worked for me...

And just a little side note, if you suddenly wonder about "datetime-local" as well, it is the same just without the ending Z

9. December 2011, 08:14:18

DCA

Posts: 78

Thumbs up, works! Tks

Forums » Dev.Opera » Archived Opera Web Standards Curriculum Discussions