This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree 2 files changed +17
-1
lines changed
app/code/Magento/Customer/Block/Widget
lib/internal/Magento/Framework/View/Element/Html
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ public function getFieldHtml()
186
186
'max_date ' => '-1d ' ,
187
187
'change_month ' => 'true ' ,
188
188
'change_year ' => 'true ' ,
189
- 'show_on ' => 'both '
189
+ 'show_on ' => 'both ' ,
190
+ 'first_day ' => $ this ->getFirstDay ()
190
191
]);
191
192
return $ this ->dateElement ->getHtml ();
192
193
}
@@ -304,4 +305,17 @@ public function getMaxDateRange()
304
305
}
305
306
return null ;
306
307
}
308
+
309
+ /**
310
+ * Return first day of the week
311
+ *
312
+ * @return int
313
+ */
314
+ public function getFirstDay ()
315
+ {
316
+ return (int )$ this ->_scopeConfig ->getValue (
317
+ 'general/locale/firstday ' ,
318
+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE
319
+ );
320
+ }
307
321
}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ protected function _toHtml()
26
26
$ changeYear = $ this ->getChangeYear ();
27
27
$ maxDate = $ this ->getMaxDate ();
28
28
$ showOn = $ this ->getShowOn ();
29
+ $ firstDay = $ this ->getFirstDay ();
29
30
30
31
$ html .= '<script type="text/javascript">
31
32
require(["jquery", "mage/calendar"], function($){
@@ -59,6 +60,7 @@ protected function _toHtml()
59
60
($ changeMonth === null ? '' : ', changeMonth: ' . $ changeMonth ) .
60
61
($ changeYear === null ? '' : ', changeYear: ' . $ changeYear ) .
61
62
($ showOn ? ', showOn: " ' . $ showOn . '" ' : '' ) .
63
+ ($ firstDay ? ', firstDay: ' . $ firstDay : '' ) .
62
64
'})
63
65
});
64
66
</script> ' ;
You can’t perform that action at this time.
0 commit comments