Skip to content

Commit 3df080d

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-51719' into MAGETWO-51824
2 parents 47a73b5 + b4b673f commit 3df080d

File tree

1 file changed

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

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@ define([
113113
}
114114

115115
shiftedValue = shiftedValue.format(this.datetimeFormat);
116-
117-
if (shiftedValue !== this.shiftedValue()) {
118-
this.shiftedValue(shiftedValue);
119-
}
116+
} else {
117+
shiftedValue = '';
118+
}
119+
if (shiftedValue !== this.shiftedValue()) {
120+
this.shiftedValue(shiftedValue);
120121
}
121122
},
122123

@@ -137,10 +138,11 @@ define([
137138
value = moment(shiftedValue, this.datetimeFormat);
138139
value = value.format(this.outputDateFormat);
139140
}
140-
141-
if (value !== this.value()) {
142-
this.value(value);
143-
}
141+
} else {
142+
value = '';
143+
}
144+
if (value !== this.value()) {
145+
this.value(value);
144146
}
145147
},
146148

0 commit comments

Comments
 (0)