public function Calendar($sFieldName, $sFromName = "", $sToName = "", $bTime = false) { /* /** @global CMain $APPLICATION * global $APPLICATION; ob_start(); $APPLICATION->IncludeComponent('bitrix:main.calendar', '', array( 'RETURN' => 'Y', 'SHOW_INPUT' => 'N', 'INPUT_NAME' => $sFieldName, 'SHOW_TIME' => $bTime ? 'Y' : 'N' ), null, array('HIDE_ICONS' => 'Y')); $res = ob_get_contents(); ob_end_clean(); return $res; */ //Buffer::addJS(Config::getConfig("CORE_ROOT")."js/core.js"); //Buffer::addCSS(Config::getConfig("CORE_ROOT")."css/core.css"); Buffer::addJS(Config::getConfig("CORE_ROOT") . "js/core_date.js"); Buffer::addCSS(Config::getConfig("CORE_ROOT") . "css/core_date.css"); Buffer::addJS(Config::getConfig("CORE_ROOT") . "js/core_popup.js"); Buffer::addCSS(Config::getConfig("CORE_ROOT") . "css/core_popup.css"); $arParams = array('RETURN' => 'Y', 'SHOW_INPUT' => 'N', 'INPUT_NAME' => $sFieldName, 'SHOW_TIME' => $bTime ? 'Y' : 'N'); ?> <img src="/bitrix/js/main/core/images/calendar-icon.gif" alt="Выбрать дату в календаре" class="calendar-icon" onclick="BX.calendar({node:this, field:'<?php echo $arParams['INPUT_NAME']; ?> ', form: '', bTime: <?php echo $arParams['SHOW_TIME'] == 'Y' ? 'true' : 'false'; ?> , currentTime: '<?php echo time(); ?> ', bHideTime: <?php echo $arParams['HIDE_TIMEBAR'] == 'Y' ? 'true' : 'false'; ?> });" onmouseover="BX.addClass(this, 'calendar-icon-hover');" onmouseout="BX.removeClass(this, 'calendar-icon-hover');" border="0"/><?php }