File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
app/code/Magento/Ui/view/base/web/js/form/element Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,16 @@ define([
76
76
*
77
77
* @type {String }
78
78
*/
79
- shiftedValue : ''
79
+ shiftedValue : '' ,
80
+
81
+ /**
82
+ * Stored Date format initially received from server
83
+ * for offline date formatting
84
+ *
85
+ * @private
86
+ * @type {String }
87
+ */
88
+ storedDateFormat : ''
80
89
} ,
81
90
82
91
/**
@@ -125,9 +134,12 @@ define([
125
134
shiftedValue = moment ( value , dateFormat ) ;
126
135
}
127
136
128
- if ( ! shiftedValue . isValid ( ) ) {
129
- shiftedValue = moment ( value , this . pickerDateTimeFormat ) ;
137
+ if ( this . storedDateFormat ) {
138
+ shiftedValue = moment ( value , this . storedDateFormat ) ;
139
+ } else {
140
+ this . storedDateFormat = dateFormat ;
130
141
}
142
+
131
143
shiftedValue = shiftedValue . format ( this . pickerDateTimeFormat ) ;
132
144
} else {
133
145
shiftedValue = '' ;
You can’t perform that action at this time.
0 commit comments