HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2253

File a bug

SVNBugCommentTime (UTC)
2253WF2: <input type=time>2008-09-30 21:21
Index: source
===================================================================
--- source	(revision 2252)
+++ source	(revision 2253)
@@ -27104,10 +27104,120 @@
   title="attr-input-type-time">Time</span> state, the rules in this
   section apply.</p>
 
-  <p class="big-issue">...</p>
+  <p>The <code>input</code> element represents a control for setting
+  the element's <span title="concept-fe-value">value</span> to a
+  string representing a specific <span
+  title="concept-time">time</span>.</p>
 
+  <p>If the element is <i title="concept-input-mutable">mutable</i>,
+  the user should allow the user to change the <span
+  title="concept-time">time</span> represented by its <span
+  title="concept-fe-value">value</span>, as obtained by <span
+  title="parse a time string">parsing a time</span> from it. User
+  agents must not allow the user to set the <span
+  title="concept-fe-value">value</span> to a string that is not a
+  <span>valid time string</span>. If the user agent provides a user
+  interface for selecting a <span title="concept-time">time</span>,
+  then the <span title="concept-fe-value">value</span> must be set to
+  a <span>valid time string</span> representing the user's
+  selection. User agents should allow the user to set the <span
+  title="concept-fe-value">value</span> to the empty string.</p>
 
+  <p><strong>The <span>value sanitization algorithm</span> is as
+  follows:</strong> If the <span title="concept-fe-value">value</span>
+  of the element is not a <span>valid time string</span>, then set it
+  to the empty string instead.</p>
 
+  <p>The <code title="attr-input-min">min</code> attribute, if
+  specified, must have a value that is a <span>valid time
+  string</span>. The <code title="attr-input-max">max</code>
+  attribute, if specified, must have a value that is a <span>valid
+  time string</span>.</p>
+
+  <p>The <code title="attr-input-step">step</code> attribute is
+  expressed in seconds. The <span
+  title="concept-input-step-scale">step scale factor</span> is 1000
+  (which converts the seconds to milliseconds, as used in the other
+  algorithms). The <span title="concept-input-step-default">default
+  step</span> is 60 seconds.</p>
+
+  <p>When the element is <span>suffering from a step mismatch</span>,
+  the user agent may round the element's <span
+  title="concept-input-value">value</span> to the nearest <span
+  title="concept-time">time</span> for which the element would not
+  <span title="suffering from a step mismatch">suffer from a step
+  mismatch</span>.</p>
+
+  <p><strong>The <span
+  title="concept-input-value-string-number">algorithm to convert a
+  string to a number</span>, given a string <var title="">input</var>,
+  is as follows:</strong> If <span title="parse a time string">parsing
+  a time</span> from <var title="">input</var> results in an error,
+  then return an error; otherwise, return the number of milliseconds
+  elapsed from midnight to the parsed <span
+  title="concept-time">time</span> on a day with no time changes.</p>
+
+  <p><strong>The <span
+  title="concept-input-value-number-string">algorithm to convert a
+  number to a string</span>, given a number <var title="">input</var>,
+  is as follows:</strong> Return a <span>valid time string</span> that
+  represents the <span title="concept-time">time</span> that is <var
+  title="">input</var> milliseconds after midnight on a day with no
+  time changes.</p>
+
+  <p><strong>The <span
+  title="concept-input-value-string-date">algorithm to convert a
+  string to a <code>Date</code> object</span>, given a string <var
+  title="">input</var>, is as follows:</strong> If <span title="parse
+  a time string">parsing a time</span> from <var title="">input</var>
+  results in an error, then return an error; otherwise, return a
+  <code>Date</code> object representing the parsed <span
+  title="concept-time">time</span> in UTC on 1970-01-01.</p>
+
+  <p><strong>The <span
+  title="concept-input-value-date-string">algorithm to convert a
+  <code>Date</code> object to a string</span>, given a
+  <code>Date</code> object <var title="">input</var>, is as
+  follows:</strong> Return a <span>valid time string</span> that
+  represents the UTC <span title="concept-time">time</span> component
+  that is represented by <var title="">input</var>.</p>
+
+  <p>The following common <code>input</code> element content
+  attributes, DOM attributes, and methods apply to the element:
+  <code title="attr-input-autocomplete">autocomplete</code>,
+  <code title="attr-input-list">list</code>,
+  <code title="attr-input-max">max</code>,
+  <code title="attr-input-min">min</code>,
+  <code title="attr-input-readonly">readonly</code>,
+  <code title="attr-input-required">required</code>, and
+  <code title="attr-input-step">step</code> content attributes;
+  <code title="dom-input-list">list</code>,
+  <code title="dom-input-valueAsDate">valueAsDate</code>,
+  <code title="dom-input-valueAsNumber">valueAsNumber</code>,
+  <code title="dom-input-selectedOption">selectedOption</code>,
+  <code title="dom-input-stepUp">stepUp()</code>, and
+  <code title="dom-input-stepDown">stepDown()</code> DOM attributes.</p>
+
+  <p>The following content attributes must not be specified and do not
+  apply to the element:
+  <code class="no-backref" title="attr-input-accept">accept</code>,
+  <code class="no-backref" title="attr-input-alt">alt</code>,
+  <code class="no-backref" title="attr-input-checked">checked</code>,
+  <code class="no-backref" title="attr-input-maxlength">maxlength</code>,
+  <code class="no-backref" title="attr-input-pattern">pattern</code>,
+  <code class="no-backref" title="attr-input-size">size</code>,
+  <code class="no-backref" title="attr-input-src">src</code>,
+  <code class="no-backref" title="attr-fs-target">target</code>,
+  <code class="no-backref" title="attr-fs-method">method</code>,
+  <code class="no-backref" title="attr-fs-enctype">enctype</code>, and
+  <code class="no-backref" title="attr-fs-action">action</code>.</p>
+
+  <p>The
+  <code class="no-backref" title="dom-input-checked">checked</code>
+  DOM attribute does not apply to the element.</p>
+
+
+
   <h6><dfn title="attr-input-type-datetime-local">Local Date and Time</dfn> state</h6>
 
   <p>When an <code>input</code> element's <code

|