for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of AppName.
*
* (c) Monofony
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Form\Extension;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class DateTypeExtension extends AbstractTypeExtension
{
/**
* {@inheritdoc}
public function configureOptions(OptionsResolver $resolver)
$resolver
->setDefaults([
'widget' => 'single_text',
'html5' => false,
'format' => 'dd/MM/yyyy',
]);
}
public static function getExtendedTypes(): iterable
return [DateType::class];