File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/code/Magento/Ui/view/base/web/js/form/element Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -141,16 +141,16 @@ define([
141
141
onShiftedValueChange : function ( shiftedValue ) {
142
142
var value ,
143
143
formattedValue ,
144
- momentDateTime ;
144
+ momentValue ;
145
145
146
146
if ( shiftedValue ) {
147
+ momentValue = moment ( shiftedValue , this . pickerDateTimeFormat ) ;
148
+
147
149
if ( this . options . showsTime ) {
148
- momentDateTime = moment ( shiftedValue , this . pickerDateTimeFormat ) ;
149
- formattedValue = moment ( momentDateTime ) . format ( this . timezoneFormat ) ;
150
+ formattedValue = moment ( momentValue ) . format ( this . timezoneFormat ) ;
150
151
value = moment . tz ( formattedValue , this . storeTimeZone ) . tz ( 'UTC' ) . toISOString ( ) ;
151
152
} else {
152
- value = moment ( shiftedValue , this . pickerDateTimeFormat ) ;
153
- value = value . format ( this . outputDateFormat ) ;
153
+ value = momentValue . format ( this . outputDateFormat ) ;
154
154
}
155
155
} else {
156
156
value = '' ;
You can’t perform that action at this time.
0 commit comments