Skip to content

Commit 050f43b

Browse files
committed
Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-69971
2 parents f8775df + 1aaa2fc commit 050f43b

File tree

38 files changed

+1246
-122
lines changed

38 files changed

+1246
-122
lines changed

app/code/Magento/Analytics/README.md

Lines changed: 776 additions & 8 deletions
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public function getCalendarDateHtml()
8181
$yearStart = $this->_catalogProductOptionTypeDate->getYearStart();
8282
$yearEnd = $this->_catalogProductOptionTypeDate->getYearEnd();
8383

84+
$dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
85+
/** Escape RTL characters which are present in some locales and corrupt formatting */
86+
$escapedDateFormat = preg_replace('/[^MmDdYy\/\.\-]/', '', $dateFormat);
8487
$calendar = $this->getLayout()->createBlock(
8588
\Magento\Framework\View\Element\Html\Date::class
8689
)->setId(
@@ -92,7 +95,7 @@ public function getCalendarDateHtml()
9295
)->setImage(
9396
$this->getViewFileUrl('Magento_Theme::calendar.png')
9497
)->setDateFormat(
95-
$this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT)
98+
$escapedDateFormat
9699
)->setValue(
97100
$value
98101
)->setYearsRange(

0 commit comments

Comments
 (0)