addCriticalStylesheet('css/thirdpart/jquery-ui.css'); $doc->addCriticalStylesheet('css/modules/form-element-multiDate.css'); $doc->addScript('js/lib/form-element-multidate.js'); $doc->addScript('js/jquery-ui.js'); $doc->addScript('js/jquery-ui.multidatespicker.js'); $options = [ 'altField' => '#' . $attribs['id'], 'dateFormat' => 'yy-mm-dd', 'addDates' => $value, ]; $attribs = (array) $attribs; foreach ($this->_allowedOptions as $optionName) { if (array_key_exists($optionName, $attribs)) { $options[$optionName] = $attribs[$optionName]; unset($attribs[$optionName]); } } $doc->addInitObject('qs.form.element.MultiDate', [$attribs['id'], $options]); return parent::formHidden($name, null, $attribs) . '
' . '