Source for file form_field_date.class.php
Documentation is available at form_field_date.class.php
// *** Tangra (Application Framework and Tools for PHP)
* Contains class Form_Field_Date
require_once(TANGRA_MAIN_DIR. 'form/fields/text/form_field_text.class.php');
require_once(TANGRA_MAIN_DIR. 'nls/date.inc.php');
* Represents text field that accepts date
* @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
* @param string $date_format - Format that will be used
function __construct($name, $required = false, $maxlength = 10, $value = NULL, $date_format = TANGRA_DATE_FORMAT_YYYYSMMSDD) {
throw new Tangra_Exception('Invalid date = '. $value);
parent::__construct($name, $required, $maxlength ,$value);
* Returns format for the date
* Performs basic check for validity
* Returns array with field properties
|