Система управления «Сайт PRO»
Версия 20240107

input.month.php

Поле «Дата и время»

Вызывается из:

Смотрите описание Cms\Root\Form\Field\Month

Исходный код
<?php

$attributes = $Field->getInputAttributes(array(
    'grid-margin' => $Field->getInputMargin(),
    'grid-width' => $Field->getInputWidth(),
    'type' => 'month',
    'name' => $Field->name,
    'value' => $Field->v(),
    'placeholder' => strval($Field->placeholder) !== '' ? htmlspecialchars($Field->placeholder) : null,
    'required' => $Field->required ? '' : null,
    'readonly' => $Field->readonly ? '' : null,
    'disabled' => $Field->disabled ? '' : null,
    'class' => 'field-input field-input--' . $Field->type . ' input input--' . $Field->type,
    'id' => $Field->id('-input'),
    'onclick' => 'try { this.showPicker() } catch (e) { }',
));
print '<input';
foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
print '>';

$attributes = $Field->getButtonAttributes(array(
    'type' => 'button',
    'disabled' => $Field->disabled ? '' : null,
    'class' => 'button-1 no-pointer',
    'id' => $Field->id('-button'),
    'tabindex' => '-1',
));
print '<button';
foreach ($attributes as $attributeName => $attributeValue) if ($attributeValue !== null) print ' ' . $attributeName . '="' . $attributeValue . '"';
print '><i class="las la-calendar"></i></button>';

?>