Skip to content

Commit 264cff3

Browse files
[Form] Allow integer for the calendar option of DateType
1 parent 73c00ef commit 264cff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/Core/Type/DateType.php

+1-1
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)