datetime

Information

Folder
src/components/elements/datetime

Files

Schema
// src/components/elements/datetime/schema.yaml

$schema: http://json-schema.org/draft-07/schema#
$id: /elements/datetime
additionalProperties: false
required:
  - content
properties:
  content:
    type: string
    format: html
  description:
    type: string
  description_attributes:
    type: object
  errors:
    type: string
  title:
    type: string
  title_attributes:
    type: object
Mocks
// src/components/elements/datetime/mocks.yaml

content:
  $tpl: elements/datetime/form
  $ref: elements/datetime/form
title: Title
description: Sunt occaecat est deserunt anim.
$variants:
  - $name: With error
    errors: <p>This is an error message.</p>
Template
// src/components/elements/datetime/datetime.twig

{% set children %}
	<div{{ attributes }} class="DateTime">
		{{ content }}
	</div>
{% endset %}

{% include "@elements/form/fieldset/fieldset.twig" with {
	title: title,
	title_attributes: title_attributes,
	children: children,
	errors: errors,
	description: description,
	description_attributes: description_attributes,
} only %}

Variants

default
Open
Title

Sunt occaecat est deserunt anim.

With error
Open
Title

This is an error message.

Sunt occaecat est deserunt anim.