We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now Symfony DateType has 3 widget types: choice, text, single_text.
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
y-M-d
We have business requirement, that months always must be rendered as numbers (from 01 to 12). What is the best way to achieve this?
The text was updated successfully, but these errors were encountered:
$form = $this->createFormBuilder() ->add('birthday', DateType::class, [ 'widget' => 'choice', 'format' => 'MM-d-y', ]) ->getForm();
Sorry, something went wrong.
Thank you, @yceruto!
No branches or pull requests
Now Symfony DateType has 3 widget types:
choice
,text
,single_text
.When using widget type
choice
the format isy-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#L73We have business requirement, that months always must be rendered as numbers (from 01 to 12). What is the best way to achieve this?
The text was updated successfully, but these errors were encountered: