Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Mar 7, 2019
1 parent 122fb7b commit 46e650f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,14 @@ field as **three different choice fields**::
'widget' => 'choice',
]);

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::
If your underlying date is *not* a ``DateTime`` object (e.g. it's a unix
timestamp or a ``DateTimeImmutable`` object), configure the `input`_ option::

$builder->add('publishedAt', DateType::class, [
'widget' => 'choice',
'input' => 'datetime_immutable'
]);


Rendering a single HTML5 Textbox
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 46e650f

Please sign in to comment.