The Timestamp field allows content writers to add a date and time.

This field is different from the Date field which adds a date and does not include a time.

 

Configuration

Assign the Timestamp 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 timestamp field with a default value corresponding to today's date and the current time. Refer to the example below.

 

JSON Editor

The following allows you to select a date and time:

"time-and-date": {
  "type": "Timestamp",
  "config": {
    "label": "Time and Date",
    "placeholder": "Select a time & date..."
  }
}

 
The following example is a timestamp with a default value of today’s date and the current time:

"created-on" : {
  "type" : "Timestamp",
  "config" : {
    "label" : "Created On",
    "default" : "now"
  }
}

 

JSON Reference 

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

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

 

config

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

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

"default": (string) If set to "now", it will automatically fill the field in with a default value of today's date and the current time

Did this answer your question?