8000 deprecated 'datettime' Form Type · symfony/symfony-docs@cae7a80 · GitHub
[go: up one dir, main page]

Skip to content

Commit cae7a80

Browse files
dsminkwouterj
authored andcommitted
deprecated 'datettime' Form Type
'datettime' to DateTimeType::class
1 parent 1a600cd commit cae7a80

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)
0