Skip to content

[Form] DateType widget choice - always render months as numbers #23064

Closed
@krafas

Description

@krafas

Now Symfony DateType has 3 widget types: choice, text, single_text.

When using widget type choice the format is y-M-d and can't be changed, see: https://github.com/symfony/symfony/blob/v3.3.0/src/Symfony/Component/Form/Extension/Core/Type/DateType.php#L73

We have business requirement, that months always must be rendered as numbers (from 01 to 12). What is the best way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions