Skip to content

Commit f31a73c

Browse files
author
Roman Lytvynenko
committed
MAGETWO-99832: Order grid saved view with Purchased date show Invalid date after switching views
1 parent c8d0ce8 commit f31a73c

File tree

1 file changed

+6
-7
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element

1 file changed

+6
-7
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/date.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,15 @@ define([
130130
if (this.options.showsTime) {
131131
shiftedValue = moment.tz(value, 'UTC').tz(this.storeTimeZone);
132132
} else {
133-
dateFormat = this.shiftedValue() ? this.outputDateFormat : this.inputDateFormat;
133+
if (this.storedDateFormat) {
134+
dateFormat = this.storedDateFormat;
135+
} else {
136+
dateFormat = this.shiftedValue() ? this.outputDateFormat : this.inputDateFormat;
137+
this.storedDateFormat = dateFormat;
138+
}
134139
shiftedValue = moment(value, dateFormat);
135140
}
136141

137-
if (this.storedDateFormat) {
138-
shiftedValue = moment(value, this.storedDateFormat);
139-
} else {
140-
this.storedDateFormat = dateFormat;
141-
}
142-
143142
shiftedValue = shiftedValue.format(this.pickerDateTimeFormat);
144143
} else {
145144
shiftedValue = '';

0 commit comments

Comments
 (0)