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
}
@@ -307,4 +308,17 @@ public function getMaxDateRange()
307
308
}
308
309
return null ;
309
310
}
311
+
312
+ /**
313
+ * Return first day of the week
314
+ *
315
+ * @return int
316
+ */
317
+ public function getFirstDay ()
318
+ {
319
+ return (int )$ this ->_scopeConfig ->getValue (
320
+ 'general/locale/firstday ' ,
321
+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE
322
+ );
323
+ }
310
324
}
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