Permalink
Browse files

MINOR Fixed documentation for DatetimeField

  • Loading branch information...
1 parent 59230d8 commit eda75a2aa9b4487f4dbebb54e234f51549abd0c6 @chillu chillu committed Mar 29, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 forms/DatetimeField.php
@@ -8,7 +8,15 @@
*
* # Configuration
*
- * All options in {@link setConfig()} are passed through to {@link DateField} and {@link TimeField}.
+ * The {@link setConfig()} method is only used to configure common properties of this field.
+ * To configure the {@link DateField} and {@link TimeField} instances contained within, use their own {@link setConfig()} methods.
+ *
+ * Example:
+ * <code>
+ * $field = new DatetimeField('Name', 'Label');
+ * $field->setConfig('datavalueformat', 'YYYY-MM-dd HH:mm'); // global setting
+ * $field->getDateField()->setConfig('showcalendar', 1); // field-specific setting
+ * </code>
*
* @package sapphire
* @subpackage forms

0 comments on commit eda75a2

Please sign in to comment.