->add(
'createdAt',
'doctrine_orm_date_range',
[],
'sonata_type_date_range_picker',
[
'field_options_start' => [
'format' => 'dd.MM.yyyy'
],
'field_options_end' => [
'format' => 'dd.MM.yyyy'
]
]
)
php app/console doctrine:mapping:import AppBundle annotation
$builder->add('date', DateType::class, array(
'widget' => 'single_text',
// this is actually the default format for single_text
'format' => 'yyyy-MM-dd',
));