Skip to content

Commit f387ecb

Browse files
committed
AC-12025::Upgrade moment.js system dependency to the latest minor version
1 parent 16dc943 commit f387ecb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/Customer/view/frontend/web/js/validation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ define([
1111
$.validator.addMethod(
1212
'validate-date',
1313
function (value, element, params) {
14+
if (params.dateFormat === 'M/dd/y') {
15+
params.dateFormat = 'MM/dd/y';
16+
}
1417
var dateFormat = utils.normalizeDate(params.dateFormat);
15-
1618
if (value === '') {
1719
return true;
1820
}

dev/tests/js/jasmine/tests/app/code/Magento/Customer/frontend/js/validation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define([
1616

1717
dataProvider = [
1818
{
19-
format: 'M/d/Y',
19+
format: 'MM/d/Y',
2020
date: '09/2/18',
2121
expects: true
2222
},

0 commit comments

Comments
 (0)