A structured input that stores date values in ISO 8601 format. Uses react-datetime under the hood.
For additional properties common to all Field types, check the Field type definition.
Set this to "datetime"
to use the Datetime Field.
The name of the field for internal use.
All properties marked as REQUIRED must be specified for the field to work properly.
Datetimes' are persisted as UTC, converted from local time of the user on input.
Any extra properties added to the the date field definition under ui will be passed along to the react-datettime component.
{type: 'datetime',name: 'date',label: 'Date'}
You can customize the format that the date field use by customizing the dateFormat & parse properties.
{label: "Date",name: "date",type: "datetime",ui: {dateFormat: 'YY-MM-DD',parse: (value) => value && value.format('YY-MM-DD'),},}
You can add a timepicker to the date UI by supplying the ui.timeFormat
property.
{label: "Date",name: "date",type: "datetime",ui: {timeFormat: "HH:mm"},}
© TinaCMS 2019–2025