Merge pull request #2002 from SergioCrisostomo/avoid-throw-if-wrong-input

Return empty string if the date input doesn't parse
This commit is contained in:
Aresn 2017-09-27 02:10:38 -05:00 committed by GitHub
commit 5bd5dd5918

View file

@ -366,6 +366,8 @@
} else {
correctValue = formatDate(parsedDate, format);
}
} else if (!parsedDate) {
correctValue = '';
} else {
correctValue = oldValue;
}