Skip to content

[Form] input=datetime_immutable for DateType, TimeType, DateTimeType #8920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ as a series of ``select`` boxes. When the placeholder value is a string,
it will be used as the **blank value** of all select boxes::

use Symfony\Component\Form\Extension\Core\Type\DateTimeType;

$builder->add('startDateTime', DateTimeType::class, array(
'placeholder' => 'Select a value',
));
Expand All @@ -92,7 +92,7 @@ Alternatively, you can use an array that configures different placeholder
values for the year, month, day, hour, minute and second fields::

use Symfony\Component\Form\Extension\Core\Type\DateTimeType;

$builder->add('startDateTime', DateTimeType::class, array(
'placeholder' => array(
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
Expand Down Expand Up @@ -125,6 +125,7 @@ on your underlying object. Valid values are:

* ``string`` (e.g. ``2011-06-05 12:15:00``)
* ``datetime`` (a ``DateTime`` object)
* ``datetime_immutable`` (a ``DateTimeImmutable`` object)
* ``array`` (e.g. ``array(2011, 06, 05, 12, 15, 0)``)
* ``timestamp`` (e.g. ``1307276100``)

Expand Down
1 change: 1 addition & 0 deletions reference/forms/types/options/date_input.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on your underlying object. Valid values are:

* ``string`` (e.g. ``2011-06-05``)
* ``datetime`` (a ``DateTime`` object)
* ``datetime_immutable`` (a ``DateTimeImmutable`` object)
* ``array`` (e.g. ``array('year' => 2011, 'month' => 06, 'day' => 05)``)
* ``timestamp`` (e.g. ``1307232000``)

Expand Down
1 change: 1 addition & 0 deletions reference/forms/types/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ on your underlying object. Valid values are:

* ``string`` (e.g. ``12:17:26``)
* ``datetime`` (a ``DateTime`` object)
* ``datetime_immutable`` (a ``DateTimeImmutable`` object)
* ``array`` (e.g. ``array('hour' => 12, 'minute' => 17, 'second' => 26)``)
* ``timestamp`` (e.g. ``1307232000``)

Expand Down