8000 [Form] Allow integer for the `calendar` option of `DateType` · symfony/symfony@5e75bed · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e75bed

Browse files
[Form] Allow integer for the calendar option of DateType
1 parent 00a6a2d commit 5e75bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function configureOptions(OptionsResolver $resolver): void
313313
$resolver->setAllowedTypes('months', 'array');
314314
$resolver->setAllowedTypes('days', 'array');
315315
$resolver->setAllowedTypes('input_format', 'string');
316-
$resolver->setAllowedTypes('calendar', ['null', \IntlCalendar::class]);
316+
$resolver->setAllowedTypes('calendar', ['null', 'int', \IntlCalendar::class]);
317317

318318
$resolver->setInfo('calendar', 'The calendar to use for formatting and parsing the date. The value should be an instance of \IntlCalendar. By default, the Gregorian calendar with the default locale is used.');
319319

0 commit comments

Comments
 (0)
0