Skip to content

Commit edf5f79

Browse files
committed
MC-17922: Date in filter area doesn't match with Active filters bar
1 parent 0c6bbc6 commit edf5f79

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,13 @@ define([
126126
if (!shiftedValue.isValid()) {
127127
shiftedValue = moment(value, this.inputDateFormat);
128128
}
129-
130129
shiftedValue = shiftedValue.format(this.pickerDateTimeFormat);
131-
if (shiftedValue !== this.shiftedValue()) {
132-
this.shiftedValue(shiftedValue);
133-
}
134130
} else {
135-
if (this.shiftedValue()) {
136-
this.shiftedValue('');
137-
}
131+
shiftedValue = '';
132+
}
133+
134+
if (shiftedValue !== this.shiftedValue()) {
135+
this.shiftedValue(shiftedValue);
138136
}
139137
},
140138

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ define([
5858
* @param {HTMLElement} element - Element, that binding is applied to
5959
* @param {Function} valueAccessor - Function that returns value, passed to binding
6060
*/
61-
update: function(element, valueAccessor) {
61+
update: function (element, valueAccessor) {
6262
var config = valueAccessor(),
6363
observable,
6464
options = defaults,

0 commit comments

Comments
 (0)