? FormsAPI_date_1.patch
Index: forms_api_reference.html
===================================================================
RCS file: /cvs/drupal-contrib/contributions/docs/developer/topics/forms_api_reference.html,v
retrieving revision 1.49.2.1
diff -u -p -r1.49.2.1 forms_api_reference.html
--- forms_api_reference.html	12 Feb 2007 00:39:47 -0000	1.49.2.1
+++ forms_api_reference.html	12 Feb 2007 01:07:34 -0000
@@ -819,18 +819,25 @@ the value is displayed. The #options arr
   </font><font color="#0000bb">?&gt;</font></font></code></p>
 </div>
 <h3><a name="date" id="date"></a>date</h3>
-<p><strong>Description</strong>: Format a date selection box.</p>
+<p><strong>Description</strong>: Format a date selection box. The #default_value will be today's date if no value is supplied.  The format for the #default_value and the #return_value is an
+array with three elements with the keys: 'year', month', and 'day'.  For example, 
+<code><font color="#007700">array(</font><font color="#dd0000">'year' </font><font color="#007700">=&gt; </font><font color="#0000bb">2007</font><font color="#007700">, </font>
+<font color="#dd0000">'month' </font><font color="#007700">=&gt; </font><font color="#0000bb">2</font><font color="#007700">, </font>
+<font color="#dd0000">'day' </font><font color="#007700">=&gt; </font><font color="#0000bb">15</font><font color="#007700">)</font></code>
+</p>
 <p><strong>Properties</strong>: <a href="#attributes">#attributes</a>, <a href="#default_value"><strong>#default_value</strong></a>, <a href="#description">#description</a>, <a href="#prefix">#prefix</a>, <a href="#required">#required</a>, <a href="#suffix"> </a><a href="#suffix">#suffix</a>, <a href="#title"><strong>#title</strong></a>, <a href="#type"><strong>#type</strong></a>. <a href="#weightval">#weight</a></p>
 <p><strong>Usage example</strong> (<a href="http://api.drupal.org/api/5/file/modules/profile/profile.module">profile.module</a>):</p>
 <div class="codeblock"><code><font color="#000000"> <font color="#0000bb">&lt;?php<br />
   $fields</font><font color="#007700">[</font><font color="#0000bb">$category</font><font color="#007700">][</font><font color="#0000bb">$field</font><font color="#007700">-&gt;</font><font color="#0000bb">name</font><font color="#007700">] = array(<br />
 &nbsp;&nbsp;</font><font color="#dd0000">'#type' </font><font color="#007700">=&gt; </font><font color="#dd0000">'date'</font><font color="#007700">, </font><font color="#dd0000"><br />
 &nbsp;&nbsp;'#title' </font><font color="#007700">=&gt; </font><font color="#0000bb">check_plain</font><font color="#007700">(</font><font color="#0000bb">$field</font><font color="#007700">-&gt;</font><font color="#0000bb">title</font><font color="#007700">), </font><font color="#dd0000"><br />
-&nbsp;&nbsp;'#default_value' </font><font color="#007700">=&gt; </font><font color="#0000bb">$edit</font><font color="#007700">[</font><font color="#0000bb">$field</font><font color="#007700">-&gt;</font><font color="#0000bb">name</font><font color="#007700">], </font><font color="#0000bb">description</font><font color="#007700">, </font><font color="#dd0000"><br />
+&nbsp;&nbsp;'#default_value' </font><font color="#007700">=&gt; </font><font color="#0000bb">$edit</font><font color="#007700">[</font><font color="#0000bb">$field</font><font color="#007700">-&gt;</font><font color="#0000bb">name</font><font color="#007700">], </font><font color="#dd0000"><br />
 &nbsp;&nbsp;'#description' </font><font color="#007700">=&gt; </font><font color="#0000bb">_profile_form_explanation</font><font color="#007700">(</font><font color="#0000bb">$field</font><font color="#007700">), </font><font color="#dd0000"><br />
 &nbsp;&nbsp;'#required' </font><font color="#007700">=&gt; </font><font color="#0000bb">$field</font><font color="#007700">-&gt;</font><font color="#0000bb">required<br />
 </font><font color="#007700">);<br />
 </font><font color="#0000bb">?&gt;</font></font></code></div>
+
+
 <h3><a name="fieldset" id="fieldset"></a>fieldset</h3>
 <p><strong>Description</strong>:
 Format a group of form items.</p>
