File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
app/code/Magento/Ui/view/base/web/js/form/element Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright © 2015 Magento. All rights reserved.
2
+ * Copyright © 2016 Magento. All rights reserved.
3
3
* See COPYING.txt for license details.
4
4
*/
5
5
define ( [
@@ -166,8 +166,7 @@ define([
166
166
*/
167
167
prepareDateTimeFormats : function ( ) {
168
168
this . pickerDateTimeFormat = this . options . dateFormat ;
169
- this . momentFormat = ( this . options . dateFormat ) ? this . convertToMomentFormat ( this . options . dateFormat ) :
170
- this . momentFormat ;
169
+ this . momentFormat = ( this . options . dateFormat ) ? this . convertToMomentFormat ( this . options . dateFormat ) : this . momentFormat ;
171
170
if ( this . options . showsTime ) {
172
171
this . pickerDateTimeFormat += ' ' + this . options . timeFormat ;
173
172
}
@@ -189,7 +188,9 @@ define([
189
188
* @returns {String } Moment compatible format
190
189
*/
191
190
convertToMomentFormat : function ( format ) {
192
- var newFormat = format . replace ( / y y | y / gi, 'YYYY' ) ; // replace the year
191
+ var newFormat ;
192
+
193
+ newFormat = format . replace ( / y y | y / gi, 'YYYY' ) ; // replace the year
193
194
newFormat = newFormat . replace ( / d d | d / g, 'DD' ) ; // replace the date
194
195
newFormat = newFormat . replace ( / m m | m / g, 'MM' ) ; //replace the month
195
196
return newFormat ;
You can’t perform that action at this time.
0 commit comments