Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit f81e7b4

Browse files
author
Bjorn
committed
Use IntlDateFormatter::LONG for full month names
1 parent 8e4168c commit f81e7b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Form/Type/DatePickerType.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace SumoCoders\FrameworkExampleBundle\Form\Type;
44

5+
use IntlDateFormatter;
56
use Symfony\Component\Form\AbstractType;
67
use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
78
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
@@ -24,7 +25,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
2425
'date_example1',
2526
DateType::class,
2627
array(
27-
'format' => DateType::DEFAULT_FORMAT,
28+
'format' => IntlDateFormatter::LONG,
2829
'data' => $currentDate,
2930
'widget' => 'choice',
3031
'required' => false,
@@ -104,7 +105,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
104105
'datetime_example1',
105106
DateTimeType::class,
106107
array(
107-
'date_format' => DateTimeType::DEFAULT_DATE_FORMAT,
108+
'date_format' => IntlDateFormatter::LONG,
108109
'data' => $currentDate,
109110
'widget' => 'choice',
110111
'required' => false,
@@ -145,7 +146,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
145146
'birthday_example1',
146147
BirthdayType::class,
147148
array(
148-
'format' => DateType::DEFAULT_FORMAT,
149+
'format' => IntlDateFormatter::LONG,
149150
'data' => $dateInThePast,
150151
'widget' => 'choice',
151152
'required' => false,

0 commit comments

Comments
 (0)