Skip to content

Commit b751792

Browse files
committed
Fixed datepicker problem when using non en-US locale.
1 parent 1d2f444 commit b751792

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
@@ -245,7 +245,7 @@ define([
245245
convertToMomentFormat: function (format) {
246246
var newFormat;
247247

248-
newFormat = format.replace(/yy|y/gi, 'YYYY'); // replace the year
248+
newFormat = format.replace(/yyyy|yy|y/, 'YYYY'); // replace the year
249249
newFormat = newFormat.replace(/dd|d/g, 'DD'); // replace the day
250250

251251
return newFormat;

0 commit comments

Comments
 (0)