W3C home > Mailing lists > Public > public-html@w3.org > April 2016

RE: valueAsDate for input@type=datetime-local

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Tue, 19 Apr 2016 14:35:54 +0000
To: Manuel Strehl <svg@manuel-strehl.de>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <BY2PR0301MB1575F0C88DABD58C6F50522CF86C0@BY2PR0301MB1575.namprd03.prod.outlook.com>
I'm guessing the reason is because JavaScript Date is a global time (includes a timezone), and datetime-local is a "floating" time (no timezone). Without the context of a timezone, you can't convert from floating to global time.

-----Original Message-----
From: Manuel Strehl [mailto:svg@manuel-strehl.de] 
Sent: Tuesday, April 19, 2016 6:04 AM
To: public-html@w3.org
Subject: valueAsDate for input@type=datetime-local

Hi,

short question: Why does valueAsDate not apply to type=datetime-local inputs? (I.e. should return `null` as per spec.) I tried finding reasons for that in the spec, list archive, Google, ..., but was unable to unearth any.

Thanks!

--Manuel
Received on Tuesday, 19 April 2016 14:36:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 19 April 2016 14:36:28 UTC