_appendName = true; } /** * HTML code to display this datepicker. * * @return string */ public function toHtml() { if ($this->_flagFrozen) { return $this->getFrozenHtml(); } $id = $this->getAttribute('id'); $value = $this->getValue(); if (!empty($value)) { $value = api_format_date($value, DATE_FORMAT_LONG_NO_DAY); } return '
_getAttrString($this->_attributes).'>

'.$value.'

'.$this->getElementJS(); } /** * @param string $value */ public function setValue($value) { $value = substr($value, 0, 16); $this->updateAttributes( [ 'value' => $value, ] ); } /** * @param string $layout * * @return string */ public function getTemplate($layout) { $size = $this->calculateSize(); switch ($layout) { case FormValidator::LAYOUT_INLINE: return '
{element}
'; case FormValidator::LAYOUT_HORIZONTAL: return '
{icon} {element}

{label_2}

{error}
{label_3}
'; case FormValidator::LAYOUT_BOX_NO_LABEL: return '{element}'; } } /** * Get the necessary javascript for this datepicker. * * @return string */ private function getElementJS() { $js = null; $id = $this->getAttribute('id'); $js .= ""; return $js; } }