Skip to content

Commit

Permalink
Update DateRangeType.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrombez authored Sep 21, 2023
1 parent 934a593 commit f66a2ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Form/DateRangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
])
Expand All @@ -30,6 +30,8 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => DateRange::class,
'start_label' => 'From',
'end_label' => 'To',
]);
}
}

0 comments on commit f66a2ad

Please sign in to comment.