Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DateFieldDefinition renders a calendar that allows the user to select a date and optionally a time.

Info

Date This date field definition is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.field.DateFieldDefinition.

If you work with the Magnolia 5 UI framework, see Date field for Magnolia 5 UI instead.

...

dateFormat

optional, default is yyyy-MM-dd

Format in which the date is displayed to users. See the SimpleDateFormat class for allowed patterns.

Examples:

Code Block
languageyml
dateFormat: yyyy-MM-dd           # 2017-10-31
dateFormat: yyyy-MMMM-dd         # 2017-October-31
dateFormat: EEE, MMM d, yyyy     # Tue, Oct 31, 2017

time

optional, default is false

Enables time selection. Renders dropdown lists at the bottom of the calendar.

timeFormat

optional, default is HH:mm

Format in which the time is displayed to users. See the SimpleDateFormat class for allowed patterns.

Examples:

Code Block
languageyml
timeFormat: HH:mm     # 15:09
timeFormat: h:mm a    # 3:09 PM

See also Common field properties.