Datamanager 2 simple date widget

This widget is built around the PEAR QuickForm Date widget, which effectively consists of a set of input fields for each part of the date/time. It is limited to seconds precision therefore. Currently unsupported are the Day options (selects Monday through Sunday) and 12-Hour Time formats (AM/PM time).

This widget requires the date type or a subclass thereof.

Available configuration options:

  • string format: The format of the input fields, as outlined in the QuickForm documentation (referenced at the $format member). This defaults to 'dmY'.
  • int minyear: Minimum Year available for selection (defaults to 2000).
  • int maxyear: Maximum Year available for selection (defaults to 2010).
package midcom.helper.datamanager2

 Methods

_on_initialize ()

Validates the base type

add_elements_to_form ($attributes)

Adds a PEAR Date widget to the form

Parameters

$attributes

get_default ()

The default call parses the format string and retrieves the corresponding information from the Date class of the type.

render_content ()

Renders the date using an ISO syntax

sync_type_with_widget ($results)

Parameters

$results

_generate_items ()

_populate_first_item ($key)

Parameters

$key

 Properties

 

mixed $_elements

 

mixed $_items

 

array $first_items

First items for selections.
   

int $maxyear

Maximum Year available for selection.
 

int $minyear

Minimum Year available for selection.