getID();
$name = $this->getName();
$css = $this->getCSSClass();
$system = \MCMS\System::getInstance();
$size = $this->getParam('size', 0);
$maxsize = $this->getParam('maxsize', 40);
$value = $this->getValue();
$js_import = array();
$js_submit = '';
$html = 'getInlineCSS())
$html .= 'style="' . $this->getInlineCSS() . '" ';
if($size > 0)
$html .= 'size="' . $size . '" ';
if($maxsize > 0)
$html .= 'maxlength="' . $maxsize . '" ';
if($value instanceof \DateTime || $value instanceof \Mammut\Date\Date) {
$value->setTimezone($system->getActiveTimezone());
$value = $value->format('Y-m-d\\TH:i:s');
}
if($value !== false)
$html .= 'value="' . self::escapeString((string) $value) . '" ';
if($this->isRequired()) {
$html .= ' onblur="validate(\'' . self::escapeString($id) . '\',\'^.+$\',\'' . $css . '\',\'' . $css . '_error\',true);" ';
$js_import[] = 'jscript/mcms/1.0.0/form/validate.js';
$js_submit .= '';
}
$html .= '/>';
$js_import[] = JQUERY_JS_LIB;
$js_import[] = JQUERY_UI_BASE_URL . 'minified/jquery.ui.core.min.js';
$js_import[] = JQUERY_UI_BASE_URL . 'minified/jquery.ui.widget.min.js';
$js_import[] = JQUERY_UI_BASE_URL . 'minified/jquery.ui.datepicker.min.js';
$js_end = '
var i = document.createElement("input");
i.setAttribute("type", "date");
if (i.type == "text") {
$(function() {
$( "#' . self::escapeString($id) . '" ).datepicker({ dateFormat: \'yy-mm-dd\' });
});
}
';
if($this->getParam('null')) {
$html .= ' $html,'js_import' => $js_import,'js_end' => $js_end);
}
}