_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 '
'.$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 '
';
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;
}
}