Article View: pl.comp.lang.javascript
Article #50437Re: Test html5 i input type date
From: Peter May
Date: Tue, 21 Dec 2010 18:05
Date: Tue, 21 Dec 2010 18:05
38 lines
2012 bytes
2012 bytes
W dniu 2010-12-21 16:34, Paweł Piskorz pisze:
> On 2010-12-21 14:06, Peter May wrote:
>> Sprawdzam, czy przeglądarka obsługuje właściwość "date" dla "input"-a
>> tak:
>>
>> var elm = document.createElement("input");
>> elm.setAttribute("type", "date");
>>
>> if(elm['type'] != "text")
>> {
>> return true;
>> }
>> return false;
>>
>> To pokazuje mi, że Chrome 8.0.552.224 obsługuje input type date.
>
> GChrome tak obsługuje input[type=date] jak GMail pisanie pod cytatem.
No też mi się tak zdaje :-)
>> Ale z kolei tutaj widzę:
>>
>> http://miketaylr.com/code/html5-forms-ui-support.html
>>
>> że nie Chrome nie obsługuje input type date.
>>
>> Ja mam błąd w kodzie? Czy w powyższym URL-u test jest nieprawidłowy?
>
> http://www.w3.org/TR/html5/states-of-the-type-attribute.html#date-state
> "User agents must not allow the user to set the value to a string that
> is not a valid date string."
> Jaka "data" widnieje w polach daty w GChrome "obsługującym"
> input[type=date]?
No np. 275760-09-13. Zastanawiałem się co to za dziwny format. Hm...
--
Peter
Technical Details
Message-ID:
<ieqq99$no7$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!not-for-mailReferences:
<ieq8p0$nda$1@news.onet.pl> <ieqhf4$h4p$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!not-for-mail From: Peter May <peter.may@onet.pl> Newsgroups: pl.comp.lang.javascript Subject: Re: Test html5 i input type date Date: Tue, 21 Dec 2010 19:05:23 +0100 Organization: http://onet.pl Lines: 38 Message-ID: <ieqq99$no7$1@news.onet.pl> References: <ieq8p0$nda$1@news.onet.pl> <ieqhf4$h4p$1@inews.gazeta.pl> NNTP-Posting-Host: gmq130.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1292954729 24327 83.3.68.130 (21 Dec 2010 18:05:29 GMT) X-Complaints-To: niusy@onet.pl NNTP-Posting-Date: Tue, 21 Dec 2010 18:05:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 In-Reply-To: <ieqhf4$h4p$1@inews.gazeta.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit