diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index f29a9fc76f1d2..e7d4f286464f5 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -186,7 +186,8 @@ public function getFieldHtml() 'max_date' => '-1d', 'change_month' => 'true', 'change_year' => 'true', - 'show_on' => 'both' + 'show_on' => 'both', + 'first_day' => $this->getFirstDay() ]); return $this->dateElement->getHtml(); } @@ -307,4 +308,17 @@ public function getMaxDateRange() } return null; } + + /** + * Return first day of the week + * + * @return int + */ + public function getFirstDay() + { + return (int)$this->_scopeConfig->getValue( + 'general/locale/firstday', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } } diff --git a/lib/internal/Magento/Framework/View/Element/Html/Date.php b/lib/internal/Magento/Framework/View/Element/Html/Date.php index 648d9ad6917e4..558e39427cb44 100644 --- a/lib/internal/Magento/Framework/View/Element/Html/Date.php +++ b/lib/internal/Magento/Framework/View/Element/Html/Date.php @@ -26,6 +26,7 @@ protected function _toHtml() $changeYear = $this->getChangeYear(); $maxDate = $this->getMaxDate(); $showOn = $this->getShowOn(); + $firstDay = $this->getFirstDay(); $html .= '';