Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e75bed

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/DateType.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.