The Date field allows content writers to add a date that represents a calendar day.

This field is different from the Timestamp field which includes both a date and a time.

 

Configuration

Assign the Date field a Field name, API ID, and Field placeholder text that will display in the entry editor. 

You can add an advanced option in the JSON editor that automatically fills the date field with a default value corresponding to today. Refer to the example below.

 

JSON Editor

The following defines a date:

"birthday" : {
  "type" : "Date",
  "config" : {
    "label" : "Birthday",
    "placeholder" : "mm-dd-yyyy"
  }
}

 
The following example is a date with a default value of today’s date:

"release-date" : {
  "type" : "Date",
  "config" : {
    "label" : "Release Date",
    "default" : "now"
  }
}

 

JSON Reference 

"type": (string, required) Value must equal "Date"

"config": (object, optional) Options listed below

 

config

"label": (string) Sets the label that shows up for the field in the entry editor

"placeholder": (string) Sets a user-friendly placeholder into the field

"default": (string) Setting this to "now" will automatically fill the field in with a default value of today's date

Did this answer your question?