Permalink
Browse files

Add more doc blocks.

  • Loading branch information...
markstory committed Jan 24, 2014
1 parent 1d66408 commit 8e874aba7289559679ac4927967cb2f5c5d9148b
Showing with 21 additions and 0 deletions.
  1. +21 −0 src/View/Input/DateTime.php
@@ -75,6 +75,12 @@ public function __construct($templates, $selectBox) {
* - `empty` - Set to true to add an empty option at the top of the
* option elements. Set to a string to define the display value of the
* empty option.
+ *
+ * In addtion to the above options, the following options allow you to control
+ * which input elements are generated. By setting any option to false you can disable
+ * that input picker. In addition each picker allows you to set additional options
+ * that are set as HTML properties on the picker.
+ *
* - `year` - Array of options for the year select box.
* - `month` - Array of options for the month select box.
* - `day` - Array of options for the day select box.
@@ -84,6 +90,21 @@ public function __construct($templates, $selectBox) {
* - `meridian` - Set to true to enable the meridian input. Defaults to false.
* The meridian will be enabled automatically if you chose a 12 hour format.
*
+ * The `year` option accepts the `start` and `end` options. These let you control
+ * the year range that is generated. It defaults to +-5 years from today.
+ *
+ * The `month` option accepts the `name` option which allows you to get month
+ * names instead of month numbers.
+ *
+ * The `hour` option allows you to set the `format` option which accepts
+ * 12 or 24, allowing you to indicate which hour format you want.
+ *
+ * The `minute` option allows you to define the following options:
+ *
+ * - `interval` The interval to round options to.
+ * - `round` Accepts `up` or `down`. Defines which direction the current value
+ * should be rounded to match the select options.
+ *
* @param array $data Data to render with.
* @return string A generated select box.
* @throws \RuntimeException When option data is invalid.

0 comments on commit 8e874ab

Please sign in to comment.