本文整理汇总了PHP中CAdminCalendar::calendarDate方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminCalendar::calendarDate方法的具体用法?PHP CAdminCalendar::calendarDate怎么用?PHP CAdminCalendar::calendarDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminCalendar
的用法示例。
在下文中一共展示了CAdminCalendar::calendarDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderControl
/**
* @param FieldType $fieldType
* @param array $field
* @param mixed $value
* @param bool $allowSelection
* @param int $renderMode
* @return string
*/
protected static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
{
$name = static::generateControlName($field);
$renderResult = '';
if ($renderMode & FieldType::RENDER_MODE_ADMIN) {
require_once $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/main/interface/init_admin.php';
$renderResult = \CAdminCalendar::calendarDate($name, $value, 19);
} else {
ob_start();
$GLOBALS['APPLICATION']->includeComponent('bitrix:main.calendar', '', array('SHOW_INPUT' => 'Y', 'FORM_NAME' => $field['Form'], 'INPUT_NAME' => $name, 'INPUT_VALUE' => $value, 'SHOW_TIME' => static::getType() == FieldType::DATETIME ? 'Y' : 'N'), false, array('HIDE_ICONS' => 'Y'));
$renderResult = ob_get_contents();
ob_end_clean();
}
return $renderResult;
}
示例2: GetFieldInputControl
//.........这里部分代码省略.........
<option value="N"<?php
echo in_array("N", $fieldValue) ? ' selected' : '';
?>
><?php
echo GetMessage("BPCGHLP_NO");
?>
</option>
</select>
<?php
break;
case "text":
unset($fieldValueTmp[$key]);
?>
<textarea rows="5" cols="40" id="<?php
echo $fieldNameId;
?>
" name="<?php
echo $fieldNameName;
?>
"><?php
echo htmlspecialcharsbx($value);
?>
</textarea><?php
break;
case "date":
case "datetime":
if (defined("ADMIN_SECTION") && ADMIN_SECTION) {
$v = "";
if (!\CBPDocument::IsExpression(trim($value))) {
$v = $value;
unset($fieldValueTmp[$key]);
}
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
echo CAdminCalendar::calendarDate($fieldNameName, $v, 19, $fieldType["Type"] != "date");
} else {
$value1 = $value;
if ($allowSelection && \CBPDocument::IsExpression(trim($value1))) {
$value1 = null;
} else {
unset($fieldValueTmp[$key]);
}
if ($fieldType["Type"] == "date") {
$type = "Date";
} else {
$type = "DateTime";
}
$ar = CIBlockProperty::getUserType($type);
echo call_user_func_array($ar["GetPublicEditHTML"], array(array("LINK_IBLOCK_ID" => $fieldType["Options"]), array("VALUE" => $value1), array("FORM_NAME" => $fieldName["Form"], "VALUE" => $fieldNameName), true));
}
break;
default:
unset($fieldValueTmp[$key]);
?>
<input type="text" size="40" id="<?php
echo $fieldNameId;
?>
" name="<?php
echo $fieldNameName;
?>
" value="<?php
echo htmlspecialcharsbx($value);
?>
"><?php
}
}
if ($allowSelection) {