Skip to content

Commit 227475f

Browse files
committed
MC-17269: Date format grid is not based on the locale defined in the back-office
1 parent 64ff836 commit 227475f

File tree

2 files changed

+2
-2
lines changed
  • app/code/Magento/Ui

2 files changed

+2
-2
lines changed

app/code/Magento/Ui/Component/Listing/Columns/Date.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public function prepare()
109109
'months' => $months,
110110
'monthsShort' => $monthsShort,
111111
];
112-
$config['dateFormat'] = $this->timezone->getDateTimeFormat(\IntlDateFormatter::MEDIUM);
113112
$this->setData('config', $config);
114113

115114
parent::prepare();

app/code/Magento/Ui/view/base/web/js/grid/columns/date.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ define([
3838
* @returns {String} Formatted date.
3939
*/
4040
getLabel: function (value, format) {
41+
var date;
4142
if (this.storeLocale !== undefined) {
4243
moment.locale(this.storeLocale, utils.extend({}, this.calendarConfig));
4344
}
44-
var date = moment(this._super());
45+
date = moment(this._super());
4546

4647
date = date.isValid() && value[this.index] ?
4748
date.format(format || this.dateFormat) :

0 commit comments

Comments
 (0)