From 38f1fdce47d69b5d71d52acc7e5442c7d39d23a3 Mon Sep 17 00:00:00 2001 From: dsmink Date: Mon, 23 May 2016 18:56:12 +0200 Subject: [PATCH] deprecated 'datettime' Form Type 'datettime' to DateTimeType::class --- reference/forms/types/datetime.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 4a4d40e4768..8501adc3dfc 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -82,14 +82,18 @@ If your widget option is set to ``choice``, then this field will be represented 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:: - $builder->add('startDateTime', 'datetime', array( + use Symfony\Component\Form\Extension\Core\Type\DateTimeType; + + $builder->add('startDateTime', DateTimeType::class, array( 'placeholder' => 'Select a value', )); Alternatively, you can use an array that configures different placeholder values for the year, month, day, hour, minute and second fields:: - $builder->add('startDateTime', 'datetime', array( + use Symfony\Component\Form\Extension\Core\Type\DateTimeType; + + $builder->add('startDateTime', DateTimeType::class, array( 'placeholder' => array( 'year' => 'Year', 'month' => 'Month', 'day' => 'Day', 'hour' => 'Hour', 'minute' => 'Minute', 'second' => 'Second',