Skip to content

[Grid][Docs] Fix the DateTime field defaults - #395

Open
SVillette wants to merge 1 commit into
Sylius:mainfrom
SVillette:docs-grid-datetime-timezone
Open

SVillette wants to merge 1 commit into
Sylius:mainfrom
SVillette:docs-grid-datetime-timezone

Conversation

@SVillette

Copy link
Copy Markdown

Follow-up to Sylius/SyliusGridBundle#506.

  • The examples presented DateTimeField::create('birthday', 'Y:m:d H:i:s', null) and
    timezone: null as the defaults. An explicit null actually disables the
    %sylius_grid.timezone% conversion; the examples now show an override instead, and the
    timezone option documents null as the way to opt out.
  • The default format is Y-m-d H:i:s, not Y:m:d H:i:s.
  • The setOptions() hint passed the string 'null' as timezone, which throws in
    DateTimeZone, and said the options would be unset while they fall back to their defaults.

The PHP builder examples only behave as documented once Sylius/SyliusGridBundle#506 is
released, so this may be worth merging alongside it.

🤖 Generated with Claude Code

The examples presented an explicit null timezone as the default, while it
disables the %sylius_grid.timezone% conversion, and documented the default
format as Y:m:d H:i:s instead of Y-m-d H:i:s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SVillette SVillette changed the title docs(grid): Fix the DateTime field defaults [Grid][Docs] Fix the DateTime field defaults Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant