diff --git a/src/Form/DateRangeType.php b/src/Form/DateRangeType.php index eb46050..425acb7 100644 --- a/src/Form/DateRangeType.php +++ b/src/Form/DateRangeType.php @@ -14,12 +14,12 @@ public function buildForm(FormBuilderInterface $builder, array $options): void { $builder ->add('start', DateType::class, [ - 'label' => 'From', + 'label' => $options['start_label'], 'widget' => 'single_text', 'required' => false, ]) ->add('end', DateType::class, [ - 'label' => 'To', + 'label' => $options['end_label'], 'widget' => 'single_text', 'required' => false, ]) @@ -30,6 +30,8 @@ public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'data_class' => DateRange::class, + 'start_label' => 'From', + 'end_label' => 'To', ]); } }