diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 3ed4afdba96..b47650f6f30 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -69,6 +69,14 @@ field as **three different choice fields**:: If your underlying date is *not* a ``DateTime`` object (e.g. it's a unix timestamp), configure the `input`_ option. +When working with a ``DateTimeImmutable`` object, add this as an ``input`` option:: + + $builder->add('publishedAt', DateType::class, [ + 'widget' => 'choice', + 'input' => 'datetime_immutable' + ]); + + Rendering a single HTML5 Textbox ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~