Navigation Menu

Skip to content

Commit

Permalink
[] (0) WF2: <input type=datetime> initial cut. Still needs filling in.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2229 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 24, 2008
1 parent 5a2e2dd commit 5671774
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 2 deletions.
94 changes: 93 additions & 1 deletion index
Expand Up @@ -30062,7 +30062,99 @@ function AddCloud(data, x, y) { ... }</pre>
href="#datetime3">datetime</a></code>, it is in the <a href="#date-and0"
title=attr-input-type-datetime>Date and Time</a> state.

<p class=big-issue>...
<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type14">type</a></code> attribute is in
the <a href="#date-and0" title=attr-input-type-datetime>Date and Time</a>
state, the element represents a control for setting the element's <a
href="#value12" title=concept-fe-value>value</a> 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>If an <code><a href="#input0">input</a></code> element whose <code
title=attr-input-type><a href="#type14">type</a></code> attribute is in
the <a href="#date-and0" title=attr-input-type-datetime>Date and Time</a>
state is <i title=concept-input-mutable><a
href="#mutable">mutable</a></i>, the user should allow the user to change
the date and time represented by its <a href="#value12"
title=concept-fe-value>value</a>. User agents must not allow the user to
set the <a href="#value12" title=concept-fe-value>value</a> 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 <a
href="#value12" title=concept-fe-value>value</a> 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 <a href="#value12"
title=concept-fe-value>value</a> to the empty string.

<p><strong>The <a href="#date-and0" title=attr-input-type-datetime>Date and
Time</a> state's <a href="#control0">control initialization algorithm</a>
is as follows:</strong> If the <a href="#value12"
title=concept-fe-value>value</a> of the element is not a <span>valid UTC
date and time</span>, then set it to the empty string instead.

<p><strong>The <a href="#date-and0" title=attr-input-type-datetime>Date and
Time</a> state's <a href="#default2">default value change algorithm</a> is
as follows:</strong> If the <code><a href="#input0">input</a></code>
element is not <i title=concept-input-dirty><a
href="#dirty0">dirty</a></i> then set the <a href="#value12"
title=concept-fe-value>value</a> of the element to the value of the <code
title=attr-input-value><a href="#value8">value</a></code> content
attribute and run the <a href="#control0">control initialization
algorithm</a>.

<p><strong>The <a href="#date-and0" title=attr-input-type-datetime>Date and
Time</a> state's <a href="#value10"><code
title=dom-input-value>value</code> setter algorithm</a> is as
follows:</strong> Set the <a href="#value12"
title=concept-fe-value>value</a> of the element to the new value and run
the <a href="#control0">control initialization algorithm</a>.</p>
<!-- XXX min, max, step -->

<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type14">type</a></code> attribute is in
the <a href="#date-and0" title=attr-input-type-datetime>Date and Time</a>
state, the following common <code><a href="#input0">input</a></code>
element content attributes, DOM attributes, and methods apply to the
element: <code title=attr-input-autocomplete><a
href="#autocomplete0">autocomplete</a></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><a
href="#readonly0">readonly</a></code>, <code
title=attr-input-required>required</code>, and <code
title=attr-input-step>step</code> content attributes; <code
title=dom-input-list><a href="#list">list</a></code>, <code
title=dom-input-valueAsDate><a href="#valueasdate">valueAsDate</a></code>,
<code title=dom-input-valueAsNumber><a
href="#valueasnumber">valueAsNumber</a></code>, <code
title=dom-input-selectedOption><a
href="#selectedoption">selectedOption</a></code>, <code
title=dom-input-stepUp><a href="#stepup">stepUp()</a></code>, and <code
title=dom-input-stepDown><a href="#stepdown">stepDown()</a></code> DOM
attributes.

<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type14">type</a></code> attribute is in
the <a href="#date-and0" title=attr-input-type-datetime>Date and Time</a>
state, the following content attributes must not be specified and do not
apply to the element: <code class=no-backref title=attr-input-accept><a
href="#accept0">accept</a></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><a href="#target3">target</a></code>, <code
class=no-backref title=attr-fs-method><a href="#method">method</a></code>,
<code class=no-backref title=attr-fs-enctype><a
href="#enctype">enctype</a></code>, and <code class=no-backref
title=attr-fs-action><a href="#action">action</a></code>.

<p>When an <code><a href="#input0">input</a></code> element's <code
title=attr-input-type><a href="#type14">type</a></code> attribute is in
the <a href="#date-and0" title=attr-input-type-datetime>Date and Time</a>
state, the <code class=no-backref title=dom-input-checked><a
href="#checked1">checked</a></code> DOM attribute does not apply to the
element.

<h6 id=local><span class=secno>4.10.4.1.6. </span><dfn id=local0
title=attr-input-type-datetime-local>Local Date and Time</dfn> state</h6>
Expand Down
87 changes: 86 additions & 1 deletion source
Expand Up @@ -26546,7 +26546,92 @@ function AddCloud(data, x, y) { ... }</pre>
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>



Expand Down

0 comments on commit 5671774

Please sign in to comment.