diff --git a/src/Form/Part/PartLotType.php b/src/Form/Part/PartLotType.php index 86add975..ac0e55c6 100644 --- a/src/Form/Part/PartLotType.php +++ b/src/Form/Part/PartLotType.php @@ -50,6 +50,7 @@ use App\Form\Type\StructuralEntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; +use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -116,9 +117,11 @@ class PartLotType extends AbstractType 'required' => false, ]); - $builder->add('expirationDate', DateTimeType::class, [ + $builder->add('expirationDate', DateType::class, [ 'label' => 'part_lot.edit.expiration_date', 'attr' => [], + 'widget' => 'single_text', + 'model_timezone' => 'UTC', 'required' => false, ]); diff --git a/templates/Parts/info/_part_lots.html.twig b/templates/Parts/info/_part_lots.html.twig index ad1e43e6..a53d49e6 100644 --- a/templates/Parts/info/_part_lots.html.twig +++ b/templates/Parts/info/_part_lots.html.twig @@ -36,7 +36,7 @@
{% if lot.expirationDate %} - {{ lot.expirationDate | format_datetime }} + {{ lot.expirationDate | format_date() }} {% endif %} {% if lot.expired %}