Skip to content

Commit d2958ad

Browse files
committed
bug #6608 deprecated 'datettime' Form Type (dsmink)
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes #6608). Discussion ---------- deprecated 'datettime' Form Type 'datettime' to DateTimeType::class Commits ------- cae7a80 deprecated 'datettime' Form Type
2 parents 1a600cd + cae7a80 commit d2958ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

reference/forms/types/datetime.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,18 @@ If your widget option is set to ``choice``, then this field will be represented
8787
as a series of ``select`` boxes. When the placeholder value is a string,
8888
it will be used as the **blank value** of all select boxes::
8989

90-
$builder->add('startDateTime', 'datetime', array(
90+
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
91+
92+
$builder->add('startDateTime', DateTimeType::class, array(
9193
'placeholder' => 'Select a value',
9294
));
9395

9496
Alternatively, you can use an array that configures different placeholder
9597
values for the year, month, day, hour, minute and second fields::
9698

97-
$builder->add('startDateTime', 'datetime', array(
99+
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
100+
101+
$builder->add('startDateTime', DateTimeType::class, array(
98102
'placeholder' => array(
99103
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
100104
'hour' => 'Hour', 'minute' => 'Minute', 'second' => 'Second',

0 commit comments

Comments
 (0)