Skip to content

Commit

Permalink
[Form] Allow integer for the calendar option of DateType
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Nov 27, 2024
1 parent 73c00ef commit 264cff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Extension/Core/Type/DateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver->setAllowedTypes('months', 'array');
$resolver->setAllowedTypes('days', 'array');
$resolver->setAllowedTypes('input_format', 'string');
$resolver->setAllowedTypes('calendar', ['null', \IntlCalendar::class]);
$resolver->setAllowedTypes('calendar', ['null', 'int', \IntlCalendar::class]);

$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.');

Expand Down

0 comments on commit 264cff3

Please sign in to comment.