[Bug 12902] New: Simplify input types (remove excessive date types) and add format attribute

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12902

           Summary: Simplify input types (remove excessive date types) and
                    add format attribute
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: rasamassen@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Numerous developers are not understanding this number of date types an input
can have and their control over the format.  Developers want a clear way to
control the format of the date (like if displaying time, the ability to control
whether it uses am/pm or allows milliseconds).  Moreover, people want to be
able to control the color format and the number format as well.  I, personally,
don't like the way I feel constrained by these new input types, particularly
limited to having to create an extra radio if I want to display am/pm for
languages that naturally expect am/pm over a 24hour clock.

Propose: Remove all datetime types except "datetime".  Add an attribute called
"format" which applies to "color", "number" and "datetime" OR use the pattern
attribute to achieve format functionality (these three types would have a
limited set of formats/patterns like those proposed below rather than regex
patterns, with datetime possibly having pattern options like PHP or like Java
for simplicity, or use Microsoft's descriptions
http://msdn.microsoft.com/en-us/library/az4se3k1.aspx).

Examples:
<input type="color" format="hex"> #000000
<input type="color" format="rgba"> 255, 0, 0, 0.2
<input type="color" format="hsl"> 120, 50%, 50%
<input type="number" format="integer"> 1234
<input type="number" format="float" lang="fr"> 1 234,845
<input type="number" format="decimal(2)"> 1234.84 (only allows 2 decimal
precision)
<input type="datetime" format="longdate"> Friday, September 12, 1980 ()
<input type="datetime" format="shortdate" lang="en-GB"> 21/09/1980

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 7 June 2011 14:14:19 UTC