Skip to content

Commit 3d5a46a

Browse files
tao-srostyslav-hymon
authored andcommitted
Fix: Datepicker problem when using non en-US locale.
Current code convert date format "yyyy/MM/dd" to "YYYYYYYY/MM/DD".
1 parent 18a7e29 commit 3d5a46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/mage/utils/misc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ define([
271271
convertToMomentFormat: function (format) {
272272
var newFormat;
273273

274-
newFormat = format.replace(/yy|y/gi, 'YYYY'); // replace the year
274+
newFormat = format.replace(/yyyy|yy|y/, 'YYYY'); // replace the year
275275
newFormat = newFormat.replace(/dd|d/g, 'DD'); // replace the date
276276

277277
return newFormat;

0 commit comments

Comments
 (0)