Skip to content

Commit 2abab10

Browse files
ENGCOM-1565: [Backport] Fixed datepicker problem when using non en-US locale. #15222
- Merge Pull Request #15222 from rogyar/magento2:2.1-non-us-locale-datepicker - Merged commits: 1. b751792
2 parents 1d2f444 + b751792 commit 2abab10

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)