Class TFormDateTime

Description

Date and Time Field

  • version: 07-23-2003 14:00
  • author: Greg MacLellan

Located in /form-datetime.inc.php (line 12)

TFormElement
   |
   --TFormDateTime
Direct descendents
Class Description
TFormDate Date Field
TFormTime Time Field
Variable Summary
mixed $htmltype
mixed $months
mixed $required
mixed $type
Method Summary
TFormDateTime TFormDateTime (string $name, string $displayname, string $class, bool $required, [array $yearrange = array(100,0)], [int $monthnames = null], [bool $hr24 = false], [bool $seconds = true], [int $value = ""], [bool $store = true])
A getValue ([$display $display = false])
void output ()
true setValue (mixed $value)
void validate ()
Variables
mixed $htmltype = "select" (line 17)

The HTML element type


Redefinition of:
TFormElement::$htmltype
The HTML element type

Redefined in descendants as:
mixed $minuteIncrement = 1 (line 35)

How many minutes the minute value should increment by This is a bit of a hack to access, but its valid.

  • access: public
mixed $months = array("January","February","March","April","May","June","July","August","September","October","November","December") (line 37)
mixed $required (line 13)
mixed $type = "datetime" (line 15)

The type of element


Redefinition of:
TFormElement::$type
The type of element

Redefined in descendants as:

Inherited Variables

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormDateTime (line 67)

Creates a new TFormDateTime element (multi-combobox based date/time field).

TFormDateTime TFormDateTime (string $name, string $displayname, string $class, bool $required, [array $yearrange = array(100,0)], [int $monthnames = null], [bool $hr24 = false], [bool $seconds = true], [int $value = ""], [bool $store = true])
  • string $name: The name of the element. This should correspond to the field names if using with TDBForm, and should not include any spaces or special characters.
  • string $displayname: The name that should show up to the user for this field.
  • string $class: The HTML Class to use for the element
  • bool $required: True if the field has to be filled in
  • array $yearrange: The range of years to display. This can be used two different ways: array(subtract,add), ie: array(100,0) specifies to show 100 years before the current year, up to the current year. The second way is to specify array("min"=>min,"max"=>max), ie: array("min"=>2000,"max"=>2010) will show from 2000 to 2010, regardless of the current year.
  • int $monthnames: An array of all the names to use for the months, indexed starting at 1. If null, a default of the full English month name is used (ie "January", "September", etc)
  • bool $hr24: True if a 24-hour time should be used, or false to display an am/pm box
  • bool $seconds: True to display a seconds field
  • int $value: The initial value for the field. Note if using a TDBForm this value will be overridden by loadValues so it is effectively only the default for new entries.
  • bool $store: Whether this value is persistent. Used by TDBForm to decide to save/load this value from database.
getValue (line 129)

Returns a textual description of the current value

  • return: string containing the value of the element
A getValue ([$display $display = false])
  • $display $display: True if the value is going to be used for display

Redefinition of:
TFormElement::getValue()
Returns a textual description of the current value

Redefined in descendants as:
output (line 276)
void output ()

Redefinition of:
TFormElement::output()
Outputs the HTML for this tag

Redefined in descendants as:
setValue (line 102)

Sets the value of the field

  • return: if the value was set
true setValue (mixed $value)
  • mixed $value: The value to set

Redefinition of:
TFormElement::setValue()
Sets the value of the field

Redefined in descendants as:
validate (line 87)
void validate ()

Redefinition of:
TFormElement::validate()
Validates the data in this field.

Redefined in descendants as:

Inherited Methods

Inherited From TFormElement

TFormElement::TFormElement()
TFormElement::getValue()
TFormElement::output()
TFormElement::setParent()
TFormElement::setValue()
TFormElement::validate()

Documentation generated on Thu, 27 Nov 2003 14:58:53 -0500 by phpDocumentor 1.2.3