Skip to content

Conversation

@oandregal
Copy link
Member

What?

This fixes a bug in the format prop that rendered the date format incorrectly. Additionally, the format is not set like it is in WordPress (via 0-6 numbers, and not via sunday-saturday strings).

Before:

2409-03-19 24 24

After:

Screenshot 2025-11-25 at 09 52 33

Why?

  • It fixes the bug.
  • It exposes what WordPress and the components use.

Testing Instructions

  • Visit the Storybook for "DataViews > Field Types > Date" and verify the date is rendered properly and changing the format (via storybook controls) works.
  • Visit Site Editor > Pages and verify dates are displayed properly.

@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: oandregal <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@oandregal oandregal self-assigned this Nov 25, 2025
@oandregal oandregal added [Type] Bug An existing feature does not function as intended [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Nov 25, 2025
format = field.format as Required< FormatDate >;
}

return dateI18n( format.weekStartsOn, getDate( value ) );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the bug.

@oandregal
Copy link
Member Author

This is a time-sensitive issue that fixes an issue for tomorrow's release. I've asked around, but there are no reviewers available, so I'm going to go ahead and merge the fix. Happy to do any follow-ups post-merge. 🙏

@oandregal oandregal merged commit 3e27391 into trunk Nov 25, 2025
35 of 36 checks passed
@oandregal oandregal deleted the update/weekstartson-setting branch November 25, 2025 13:39
@github-actions github-actions bot added this to the Gutenberg 22.2 milestone Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants