00001 <?PHP
00017 include_once("InputElement.php");
00018
00027 class InputDatetime extends InputText {
00028 public $m_DateFormat;
00029
00036 protected function readMetaData(&$xmlArr) {
00037 parent::readMetaData($xmlArr);
00038 $this->m_DateFormat = isset($xmlArr["ATTRIBUTES"]["DATEFORMAT"]) ? $xmlArr["ATTRIBUTES"]["DATEFORMAT"] : null;
00039 }
00040
00046 public function render() {
00047 BizSystem::clientProxy()->includeCalendarScripts();
00048
00049 $format = $this->m_DateFormat ? $this->m_DateFormat : "%Y-%m-%d %H:%M:%S";
00050
00051 $sHTML = parent::render();
00052
00053 $showTime = "'24'";
00054
00055 $sHTML .= "<a title=\"Select date...\" class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('".$this->m_Name."', '".$format."', ".$showTime.", true); return false;\" onmousemove='window.status=\"Select a datetime\"' onmouseout='window.status=\"\"'></a>";
00056 return $sHTML;
00057 }
00058 }
00059 ?>