{#
/**
 * @file
 * Theme override of a datetime form wrapper.
 *
 * @see\Drupal\Core\Form\FormPreprocess::preprocessFormElement()
 */
#}
{%
  set title_classes = [
    'label',
    required ? 'js-form-required',
    required ? 'form-required',
    errors ? 'has-error',
  ]
%}
<div class="form-datetime-wrapper">
  {% if title %}
    <h4{{ title_attributes.addClass(title_classes) }}>{{ title }}</h4>
  {% endif %}
  {{ content }}
  {% if errors %}
    <div class="form-item__error-message">
      {{ errors }}
    </div>
  {% endif %}
  {% if description %}
    <div{{ description_attributes.addClass('description') }}>
      {{ description }}
    </div>
  {% endif %}
</div>
