Skip to content

Commit 520e376

Browse files
committed
[Form] Removed unused option "pattern" of date and time type
1 parent f467317 commit 520e376

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public function buildForm(FormBuilder $builder, array $options)
3737
'with_seconds',
3838
)));
3939

40-
if (isset($options['date_pattern'])) {
41-
$dateOptions['pattern'] = $options['date_pattern'];
42-
}
4340
if (isset($options['date_widget'])) {
4441
$dateOptions['widget'] = $options['date_widget'];
4542
}
@@ -49,9 +46,6 @@ public function buildForm(FormBuilder $builder, array $options)
4946

5047
$dateOptions['input'] = 'array';
5148

52-
if (isset($options['time_pattern'])) {
53-
$timeOptions['pattern'] = $options['time_pattern'];
54-
}
5549
if (isset($options['time_widget'])) {
5650
$timeOptions['widget'] = $options['time_widget'];
5751
}
@@ -103,10 +97,8 @@ public function getDefaultOptions(array $options)
10397
// Don't modify \DateTime classes by reference, we treat
10498
// them like immutable value objects
10599
'by_reference' => false,
106-
'date_pattern' => null,
107100
'date_widget' => null,
108101
'date_format' => null,
109-
'time_pattern' => null,
110102
'time_widget' => null,
111103
/* Defaults for date field */
112104
'years' => range(date('Y') - 5, date('Y') + 5),

src/Symfony/Component/Form/Extension/Core/Type/DateType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public function getDefaultOptions(array $options)
119119
'days' => range(1, 31),
120120
'widget' => 'choice',
121121
'input' => 'datetime',
122-
'pattern' => null,
123122
'format' => \IntlDateFormatter::MEDIUM,
124123
'data_timezone' => null,
125124
'user_timezone' => null,

src/Symfony/Component/Form/Extension/Core/Type/TimeType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function getDefaultOptions(array $options)
9494
'widget' => 'choice',
9595
'input' => 'datetime',
9696
'with_seconds' => false,
97-
'pattern' => null,
9897
'data_timezone' => null,
9998
'user_timezone' => null,
10099
'csrf_protection' => false,

0 commit comments

Comments
 (0)