HTML Standard Tracker

Diff (omit for latest revision)
Filter

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

File a bug

SVNBugCommentTime (UTC)
2229WF2: <input type=datetime> initial cut. Still needs filling in.2008-09-24 10:44
Index: source
===================================================================
--- source	(revision 2228)
+++ source	(revision 2229)
@@ -26546,10 +26546,95 @@
   attribute has the value <code title="attr-input-type-datetime-keyword">datetime</code>,
   it is in the <span title="attr-input-type-datetime">Date and Time</span> state.</p>
 
-  <p class="big-issue">...</p>
+  <p>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-datetime">Date and Time</span> state, the
+  element represents a control for setting the element's <span
+  title="concept-fe-value">value</span> to a string representing a
+  specific <span>UTC date and time</span>. User agents may display the
+  time in whatever timezone is appropriate for the user.</p>
 
+  <p>If an <code>input</code> element whose <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-datetime">Date and Time</span> state is <i
+  title="concept-input-mutable">mutable</i>, the user should allow the
+  user to change the date and time represented by its <span
+  title="concept-fe-value">value</span>. 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 UTC date and time</span>. If the
+  user agent provides a user interface for selecting a date and time,
+  then the <span title="concept-fe-value">value</span> must be set to
+  a <span>valid UTC date and time</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 title="attr-input-type-datetime">Date and
+  Time</span> state's <span>control initialization algorithm</span> is
+  as follows:</strong> If the <span
+  title="concept-fe-value">value</span> of the element is not a
+  <span>valid UTC date and time</span>, then set it to the empty
+  string instead.</p>
 
+  <p><strong>The <span title="attr-input-type-datetime">Date and
+  Time</span> state's <span>default value change algorithm</span> is
+  as follows:</strong> If the <code>input</code> element is not <i
+  title="concept-input-dirty">dirty</i> then set the <span
+  title="concept-fe-value">value</span> of the element to the value of
+  the <code title="attr-input-value">value</code> content attribute
+  and run the <span>control initialization algorithm</span>.</p>
+
+  <p><strong>The <span title="attr-input-type-datetime">Date and
+  Time</span> state's <span><code title="dom-input-value">value</code>
+  setter algorithm</span> is as follows:</strong> Set the <span
+  title="concept-fe-value">value</span> of the element to the new
+  value and run the <span>control initialization algorithm</span>.</p>
+
+  <!-- XXX min, max, step -->
+
+  <p>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-datetime">Date and Time</span> state, 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>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-datetime">Date and Time</span> state, 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>When an <code>input</code> element's <code
+  title="attr-input-type">type</code> attribute is in the <span
+  title="attr-input-type-datetime">Date and Time</span> state, 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 title="attr-input-type">type</code>

|