DateTime
The
Date type provides a date picker. If not configured otherwise,
the value is stored as a timestamp.
Settings
| Name | Type | Default | Required |
|---|---|---|---|
| string | '' | ||
| string | '' | ||
| string | '' | ||
| array | |||
| boolean | false | ||
| boolean | false | ||
| boolean | true | ||
| boolean | false | ||
| object | |||
| object | |||
| object | |||
| string | |||
| boolean | false | ||
| string | |||
| boolean | false |
default
-
- Type
- string
- Default
- ''
Default value in
Y-format. Set if a new record is created. For examplem- d 2023-.01- 01
format
-
- Type
- string
- Default
- ''
Defines how the date should be formatted in the backend. Possible values are
datetime,date,datetimesec,timeandtimesec.
dbType
-
- Type
- string
- Default
- ''
This option changes the date field to a native MySql
DATETIME,DATEorTIMEfield. Possible values aredatetime,dateortimerespectively.
range
-
- Type
- array
An array which defines an integer range within which the value must be. Keys:
- lower (string in format
Y-)m- d H: i: s - Defines the min date.
- upper (string in format
Y-)m- d H: i: s - Defines the max date.
It is allowed to specify only one of both of them.
Example:
range: lower: '2020-01-01' upper: '2020-12-31'Copied!
disableAgeDisplay
-
- Type
- boolean
- Default
- false
Disable the display of the age in the backend view.
required
-
- Type
- boolean
- Default
- false
If set, the field becomes mandatory.
searchable
-
- Type
- boolean
- Default
- true
If set to false, the field will not be considered in backend search.
behaviour.allowLanguageSynchronization
-
- Type
- boolean
- Default
- false
Allows to select if localization uses custom or default language value.
fieldControl
-
- Type
- object
See TCA fieldControl.
fieldInformation
-
- Type
- object
See TCA fieldInformation.
fieldWizard
-
- Type
- object
See TCA fieldWizard.
mode
-
- Type
- string
When set to
use, a checkbox appears above the field allowing the user to override the placeholder value.Or Override Placeholder
nullable
-
- Type
- boolean
- Default
- false
Allows the database field to store a
NULLvalue.
placeholder
-
- Type
- string
Placeholder text displayed inside the field when it is empty.
readOnly
-
- Type
- boolean
- Default
- false
Renders the field in a way that the user can see the value but cannot edit it.
Examples
Minimal
name: example/datetime
fields:
- identifier: datetime
type: DateTime
format: date
name: example/datetime
fields:
- identifier: datetime
type: DateTime
format: datetime
dbType: datetime
Advanced / use case
name: example/datetime
fields:
- identifier: datetime
type: DateTime
format: datetime
default: '2023-02-11 12:00:00'
disableAgeDisplay: true
size: 20
range:
lower: '2019-01-31 12:00:00'
upper: '2040-01-31 12:00:00'
required: true