[Phpmyadmin-devel] about input type="date"

Marc Delisle marc at infomarc.info
Mon Jan 20 14:47:16 CET 2014


Michal Čihař a écrit :
> Hi
> 
> Dne Mon, 20 Jan 2014 08:04:34 -0500
> Marc Delisle <marc at infomarc.info> napsal(a):
> 
>> Please have a look at [0]. The issue is about input type="date". This 
>> gives a nice date validation in Chrome, but blocks Chrome users from 
>> pasting dates.
>>
>> I suggested to keep this input type but add a checkbox so that a user 
>> can revert to input type="text".
> 
> How about using input type="text" and adding
> pattern="[\d]{4}-[\d]{2}-[\d]{2}" to do the client side validation
> (this is just a not tested example)?

In Chrome, 'input type="date"' does more than that; for example, you 
cannot enter the month '13'.

> 
> Adding checkbox sounds like a bad idea to pollute user interface.



-- 
Marc Delisle
http://infomarc.info | http://phpmyadmin.net




More information about the Developers mailing list