Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
RichTextFieldDefinition renders a calendar that allows the user to select a date and optionally a time.
class: info.magnolia.ui.form.field.definition.DateFieldDefinition
Simple date field
form: tabs: - name: tabText label: Text fields: - name: date class: info.magnolia.ui.form.field.definition.DateFieldDefinition time: false type: Date label: Date defaultValue: now
Node name | Value |
---|---|
form | |
tabs | |
tabText | |
fields | |
date | |
class | info.magnolia.ui.form.field.definition.DateFieldDefinition |
time | false |
type | Date |
label | Date |
defaultValue | now |
You can use common field properties and the following properties in a date field definition:
Properties:
<field name> | |
| optional, default is Enables time selection. Renders dropdown boxes at the bottom of the calendar. |
| required Set the |
| optional, default is Format in which the date is displayed to users. See SimpleDateFormat class for allowed patterns. Examples: dateFormat: yyyy-MM-dd # 2017-10-31 dateFormat: yyyy-MMMM-dd # 2017-October-31 dateFormat: EEE, MMM d, yyyy # Tue, Oct 31, 2017 |
| optional, default is Format in which time is displayed to users. See SimpleDateFormat class for allowed patterns. Examples: timeFormat: HH:mm # 15:09 timeFormat: h:mm a # 3:09 PM |
| optional, default is Set the default value to a specific date such as The default value only applies to new content items, not to existing content items that have been created previously. Enclose the default value in quotes when using YAML: defaultValue: "2017-10-31" defaultValue: "2017-10-31 15:09" If you define the dateFormat: MM/dd/yyyy timeFormat: h:mm a defaultValue: "10/31/2017 3:09 PM" |