Skip to content

Commit d03d8e1

Browse files
committed
Fix Report date doesn't matching in configuration setting
1 parent a3c2af0 commit d03d8e1

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field

1 file changed

+3
-1
lines changed

app/code/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStart.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ protected function _getElementHtml(AbstractElement $element)
2323
{
2424
$_months = [];
2525
for ($i = 1; $i <= 12; $i++) {
26-
$_months[$i] = $this->_localeDate->date(mktime(null, null, null, $i, 1))->format('m');
26+
$month = $this->_localeDate->date(mktime(null, null, null, $i, 1))->format('m');
27+
$_months[$month] = $month;
2728
}
29+
ksort($_months);
2830
$_days = [];
2931
for ($i = 1; $i <= 31; $i++) {
3032
$_days[$i] = $i < 10 ? '0' . $i : $i;

0 commit comments

Comments
 (0)