КОНТРОЛЫ/date_field.md
Исходный код
Twig код
<span class="date_field_wrapper {% if control_class_name %}{{ control_class_name }}{% else %}js-control-date{% endif %} {{class_name}}" data-kalendae-classname="{{ kalendae_class }}">
{% if type == 'range' %}
{% set value_splitted = value|split(' - ') %}
{% if value_splitted|length == 1 %}
{% set value_splitted = value_splitted[0]|split('-') %}
{% endif %}
<input type="hidden" class="date_field__range_0" name="{{name.from}}" value="{{ value_splitted[0] }}" />
<input type="hidden" class="date_field__range_1" name="{{name.to}}" value="{{ value_splitted[1] }}" />
{% endif %}
{% set max_length = max_length|default(10) %}
<input class="date_field {{input_class}} {% if not value %}empty{% endif %} {% if type == 'range' %}range{% endif %}" {% if id %}id="{{id}}"{% endif %} type="text" {% if type != 'range' %}maxlength="{{max_length}}"{% endif %} {% if type == 'single' %}name="{{name}}"{% endif %} {% if title_format %}data-title-format="{{title_format}}"{% endif %} {% if hide_disabled %}data-hide-disabled{% endif %} {% if blackout %} data-blackout="{{ blackout }}" {% endif %} {% if direction %}data-direction="{{ direction }}"{% endif %} {% if data_format %}data-format="{{data_format}}"{% endif %} value="{{value}}" placeholder="{{placeholder}}" {% if disabled %}disabled="disabled"{% endif %} {% if comfort_zone %} data-comfort-zone = "{{comfort_zone}}" {% endif %}/>
{% if show_icon %}<span class="date_field-js tasks-date__caption__icon"></span>{% endif %}
{% if not readonly %}
<div class="date_field_wrapper--calendar">
<svg class="svg-card-calendar-dims"><use xlink:href="#card-calendar"></use></svg>
</div>
{% endif %}
</span>
Ссылка на вики репозиторий
- Страницы
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg
Ссылка на вики репозиторий
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg