Form/Type/DateRange.php
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $format = $options['time'] ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy';

        $builder
            ->add('startDate', 'datetime', [
                'label' => 'ekyna_core.field.start_date',
                'format' => $format,
            ])
            ->add('endDate', 'datetime', [
                'label' => 'ekyna_core.field.end_date',
                'format' => $format,
            ])
        ;
    }
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $format = $options['time'] ? 'dd/MM/yyyy HH:mm' : 'dd/MM/yyyy';

        $builder
            ->add('startDate', 'datetime', [
                'label' => 'ekyna_core.field.start_date',
                'format' => $format,
            ])
            ->add('endDate', 'datetime', [
                'label' => 'ekyna_core.field.end_date',
                'format' => $format,
            ])
        ;
    }
{@inheritdoc}