You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude)
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed DateType format option for single text widget
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
It's currently not possible to use a custom format with `DateType` when not using one of the three values day, month or year (i.e in my case "MM/yyyy").
The formatter handles it, it looks like this option check is wrong, this PR fixes it.
Commits
-------
9e0d531 [Form] Fixed DateType format option
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/DateType.php
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
51
51
thrownewInvalidOptionsException('The "format" option must be one of the IntlDateFormatter constants (FULL, LONG, MEDIUM, SHORT) or a string representing a custom format.');
0 commit comments