Skip to content

Commit

Permalink
ENGCOM-4148: Fixed #17564 Magento 2 inline edit date issues in admin …
Browse files Browse the repository at this point in the history
…grid with Ui Component #20902
  • Loading branch information
sidolov authored Feb 14, 2019
2 parents 29747d3 + 0abf5d8 commit 267d4d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/Magento/Ui/view/base/web/js/form/element/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ define([
shiftedValue = moment.tz(value, 'UTC').tz(this.storeTimeZone);
} else {
dateFormat = this.shiftedValue() ? this.outputDateFormat : this.inputDateFormat;

shiftedValue = moment(value, dateFormat);
}

if (!shiftedValue.isValid()) {
shiftedValue = moment(value, this.inputDateFormat);
}
shiftedValue = shiftedValue.format(this.pickerDateTimeFormat);
} else {
shiftedValue = '';
Expand Down

0 comments on commit 267d4d8

Please sign in to comment.