Skip to content

Commit 267d4d8

Browse files
authored
ENGCOM-4148: Fixed #17564 Magento 2 inline edit date issues in admin grid with Ui Component #20902
2 parents 29747d3 + 0abf5d8 commit 267d4d8

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ define([
122122
shiftedValue = moment.tz(value, 'UTC').tz(this.storeTimeZone);
123123
} else {
124124
dateFormat = this.shiftedValue() ? this.outputDateFormat : this.inputDateFormat;
125-
126125
shiftedValue = moment(value, dateFormat);
127126
}
128127

128+
if (!shiftedValue.isValid()) {
129+
shiftedValue = moment(value, this.inputDateFormat);
130+
}
129131
shiftedValue = shiftedValue.format(this.pickerDateTimeFormat);
130132
} else {
131133
shiftedValue = '';

0 commit comments

Comments
 (0)