Skip to content

Commit e34db30

Browse files
committed
fixed invalid date issue
1 parent cfc6ea2 commit e34db30

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
@@ -125,7 +125,9 @@ define([
125125

126126
shiftedValue = moment(value, dateFormat);
127127
}
128-
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)