Source for file form_field_datetime.class.php
Documentation is available at form_field_datetime.class.php
* Contains class Form_Field_Datetime
require_once(TANGRA_MAIN_DIR. 'form/fields/text/form_field_text.class.php');
require_once(TANGRA_MAIN_DIR. 'nls/date.inc.php');
* Represents text form field that accepts datetime values like 2008-04-20 18:33:21
* @param string $name Name of the field
* @param boolean $required Is field required. Default is false
* @param integer $maxlength Maximum length of the text. Default is 10
* @param string $value Default value. Must be valid date in YYYY-MM-DD format or 0000-00-00
function __construct($name, $required = false, $maxlength = 19, $value = NULL) {
throw new Tangra_Exception('Invalid datetime = '. $value);
parent::__construct($name, $required, $maxlength ,$value);
* Checks for valid datetime
* @return boolean Returns true if check passed
|