Tina Docs
Introduction
Overview
Introduction To TinaCMS
Getting Started
Using the Tina Editor
FAQ
Core Concepts
Content Modeling
Data Fetching
Visual Editing
Querying Content
Overview
Writing custom queries
Editing
Overview
Markdown & MDX
Block-based editing
Single Document Collections
Customizing Tina
Overview
Validation
Custom Field Components
Custom List Rendering
Format and Parse Input
Filename Customization
Before Submit function
Going To Production
Overview
Tina Cloud
Self-Hosted
Drafts
Overview
Draft Fields
Editorial Workflow
Guides
Overview
Framework Guides
Separate Content Repo
Querying Tina Content at Runtime
Internationalization
Migrating From Forestry
Further Reference
Overview
Config
Schema
The "tina" folder
The TinaCMS CLI
Media
Search
Content API
Tina's edit state
The "tinaField" helper
Self-Hosted Components

Date & Time Field


This is an advanced-use feature, and likely not something you'll need to configure. What you probably want is the content types reference!

The date field represents a date and time picker. It can be used for data values that are valid date strings.

tinacms-date-field

Options

This field plugin uses react-datetime under the hood.

interface DateConfig extends FieldConfig, DatetimepickerProps {
component: 'date'
name: string
label?: string
description?: string
dateFormat?: boolean | string // Extra properties from react-datetime
timeFormat?: boolean | string // Moment date format
}
OptionDescription
componentThe name of the plugin component. Always 'date'.
nameThe path to some value in the data being edited.
labelA human readable label for the field. Defaults to the name. (Optional)
descriptionDescription that expands on the purpose of the field or prompts a specific action. (Optional)
dateFormatDefines the format for the date. It accepts any Moment.js date format (not in localized format). If true the date will be displayed using the defaults for the current locale. See react-datetime docs for more details. (Optional)
timeFormatDefines the format for the time. It accepts any Moment.js time format (not in localized format). If true the time will be displayed using the defaults for the current locale. If false the timepicker is disabled and the component can be used as datepicker. See react-datetime docs for more details.(Optional)

FieldConfig

This interfaces only shows the keys unique to the date field.

Visit the Field Config docs for a complete list of options.

DatetimepickerProps

Any extra properties added to the the date field definition will be passed along to the react-datettime component. Moment.js format is used. See the full list of options here.

Example: Add "Created At" to Form

const formConfig = {
fields: [
{
name: 'created_at',
label: 'Created At',
component: 'date',
dateFormat: 'MMMM DD YYYY',
timeFormat: false,
},
],
}

Product

Showcase
TinaCloud
Introduction
How Tina Works
Roadmap

Resources

Blog
Examples
Support
Media

Whats New
TinaCMS
TinaCloud
Use Cases
Agencies
Documentation
Teams
Jamstack CMS
Benefits
MDX
Markdown
Git
Editorial Workflow
Customization
SEO
Comparisons
TinaCMS vs Storyblok
TinaCMS vs Sanity
TinaCMS vs DecapCMS
TinaCMS vs Contentful
TinaCMS vs Builder.io
TinaCMS vs Strapi
Integrations
Astro
Hugo
NextJS
Jekyll