0

My date field in Netlify is showing 08/19/2022 fam8/19/202205. How do I fix that? My config.yml contains:

      - {
          label: 'Date',
          name: 'date',
          widget: 'datetime',
          time_format: 'false',
          format: 'MM-DD-YYYY',
          picker_utc: true,
        }

image of the error

Cain
  • 1

1 Answers1

0

The time_format option accepts either a boolean or Moment.js tokens (cf documentation).

In your case, you are giving it a string, which it is trying to interpret as the latter (hence the weird output).

Change it to a boolean (ie: no quotes) and it should work:

- label: 'Date'
  name: 'date_test'
  widget: 'datetime'
  time_format: false
  format: 'MM-DD-YYYY'
  picker_utc: true
qbeauperin
  • 591
  • 4
  • 21