HTML;
}
function Field() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar.js");
Requirements::javascript(THIRDPARTY_DIR . "/calendar/lang/calendar-en.js");
Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar-setup.js");
Requirements::css(SAPPHIRE_DIR . "/css/CalendarDateField.css");
Requirements::css(THIRDPARTY_DIR . "/calendar/calendar-win2k-1.css");
$id = $this->id();
$val = $this->attrValue();
$futureClass = $this->futureOnly ? ' futureonly' : '';
$innerHTML = self::HTMLField( $id, $this->name, $val );
return <<
$innerHTML
HTML;
}
/**
* Sets the field so that only future dates can be set on them
*/
function futureDateOnly() {
$this->futureOnly = true;
}
}
?>