Skip to content

Issue: not respecting the configured date format while creating new posts #933

Open
@pottekkat

Description

@pottekkat

Describe the bug

I have a field like this:

{
  "title": "Publishing date",
  "name": "date",
  "type": "datetime",
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "default": "{{now}}",
  "isPublishDate": true
}

When I create a new content with this from the dashboard, the date format is not respected and it gives me something like date: 2025-03-17T05:47:48Z but when I click "Now" in the Front Matter sidebar, it gives me the correct format like date: 2025-03-17T11:18:47+05:30

To Reproduce
Steps to reproduce the behavior:

  1. Configure a date format like the one above.
  2. Create a new content.
  3. The date in the newly generated content front matter will be incorrectly formatted.
  4. Click "Now" in the date field in the Front Matter sidebar, it gives the date in the correct format.

Expected behavior

Instead, I would think Front Matter would respect the configured format when creating new content initially without having to manually set the date through the sidebar.

Device:

  • Front Matter CMS Version: 10.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    In BETAThe current task is available for testing in the BETA version.bugSomething isn't workingv10.9.0

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions