Closed
Description
Symfony version(s) affected: 3.4 (not tested on 4.x)
Description
DateTimeType doe not take into account label
configuration :
- if defined to
false
, labels are showned - if defined to
foo
,Year
Month
Day
Hour
Minute
are showned
Maybe DateType
and TimeType
have same behavior.
How to reproduce
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add(
'date',
DateTimeType::class,
[
'label' => false,
'translation_domain' => false
]
);
}
Possible Solution
https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Form/Extension/Core/Type/DateType.php#L111
Fill $yearOptions, $monthOptions and $dayOptions with our label
configuration, instead of just required
and translation_domain
Additional context
No additional context