Open navClose nav

Date Field,dpr_auto,f_auto,q_80,w_640/

A date and time picker.


  • General
    • Label — the human-friendly label shown above the input field in the editor.
    • Name — the key stored in your content’s front matter, used to access it in your templates.
    • Description — a human friendly description of what the field does and/or instructions for your editors.
    • Hidden — hides the field in the editor, but allows developers to set default values or maintain the field for legacy purposes.
  • Format
    • Date Format — how the date should be displayed in the editor. To only show the time picker, leave this field blank.
    • Time Format — how the time should be displayed in the editor. To only show the date picker, leave this field blank.
      Note: 24-hour format in the time_format display currently causes unexpected behaviour in the date picker. E.g: `kk:mm Z`
    • Display UTC — activating this option will display the date in UTC regardless of user’s locale settings.
    • Export Format — how the date/time should be exported to the repo.
  • Validation
    • Required — prevent changes from being saved if this field is empty.
  • Default — supply a default datetime.
    • Use ‘Now’ As Default — Apply the current date and time as the value for new documents.


If you have a text field in your template, you can access it in your templates using the field’s name:


<time datetime="{{ .Date }}">{{ .Date.Format "January 2, 2006" }}</time>


<time datetime="{{ }}">{{ | date: "%B, %-d, %Y" }}</time>

Config Files

You can configure this field in Front Matter Template Config Files as follows:

type: datetime
name: [String]
label: [String]
description: [String] 
default: [String]
hidden: [true|false]
  date_format: [String]
  time_format: [String]
  display_utc: [true|false]


type: datetime
name: date
label: Date
description: The creation date for this page 
hidden: false
  date_format: "YYYY/MM/DD"
  time_format: "HH:MM:SS"
  display_utc: false

The date_format, export_format, and time_format fields can be configured using Moment.js tokens.

Last updated on May 6, 2019