Re: [html5] input type=time & min/max.

Thanks, Ian.

Ian Hickson wrote:
> On Sat, 19 Sep 2009, Andrew Fedoniouk wrote:
>> http://dev.w3.org/html5/spec/Overview.html#time-state
>>
>> that defines @min and @max attributes for the <input type=time>
>>
>> Question is: If @min happens to be greater than @max:
>>
>>    <input type=time min="08:00:00" max="07:59:59" >
>>
>> what should be presented to the user?
> 
> The control has no value, so no value.
> 
> 
>> Shall the whole input be e.g. disabled or it should allow the input anyway?
> 
> The spec does not say it should be disabled because of this.

This imply that no constraint check is required at real time, correct?
In other words the only required check is submission/validation time check.

But at the same time we have this:
"User agents must not allow the user to set the value to a string that 
is not a valid time string."[1].

Seems like it is about just-in-time checks, no?

In any case you cannot input time without breaking this rule.
Partial time input in most cases is not a valid time.
Or statement "set the value to a string" needs some clarification. What 
a string?

[1] http://dev.w3.org/html5/spec/Overview.html#time-state

> 
> 
>> And yet in such conditions the input will always be unsuccessful.
>> What should be sent to the server from such an ill element?
> 
> If validation is disabled, then the min and max attributes don't affect 
> submission, and the value is submitted.
> 
> If validation is enabled, then the form can't be submitted.
> 

So in this particular case the form containing such an input will always 
be non-submittable, correct? As far as I understand form validation
algorithm does not have feature like "submit anyway".

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Saturday, 19 September 2009 23:42:02 UTC