Date Field Type

Additional attributes, defaults, and usage example for date fields.

Control Type
Input with type="date" attribute, which functions as a date picker in modern browsers.
Stored Value
String in date-only ISO-8601 format (e.g. 2017-03-09)

Usage Example

Here is an example that shows a field called publishedAt.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
export default {
  models: {
    Page: {
      fields: [
        { name: 'title', type: 'string', required: true },
        { name: 'publishedAt', type: 'date' },
      ],
    },
  },
}

The publishedAt field will be rendered as a date picker input.

Date Picker Field Control
Date Picker Field Control