Skip to main content
Version: 2024.3

Date Editable

Configuration

NameTypeDescription
formatstringA string which describes how to format the date in editmode and frontend (when outputFormat/outputIsoFormat is not defined), see possible formats
outputFormatstringDeprecated: A string which describes how to format the date in frontend, see possible formats
outputIsoFormatstringA string which describes how to format the date in frontend, see possible formats
classstringA CSS class that is added to the surrounding container of this element in editmode

Methods

NameReturnDescription
isEmpty()booleanWhether the editable is empty or not

Simple Example

The following code will create a simple date widget in editmode. In frontend it will format the date as defined in outputIsoFormat.

Localization (output-format, ...) is automatically used from the globally registered locale. Please read the topic Localization.

{{ pimcore_date("myDate", {
"format": "d.m.Y",
"outputIsoFormat": "DD.MM.YYYY"
}) }}