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:
commit
5bd5dd5918
1 changed files with 2 additions and 0 deletions
|
@ -366,6 +366,8 @@
|
||||||
} else {
|
} else {
|
||||||
correctValue = formatDate(parsedDate, format);
|
correctValue = formatDate(parsedDate, format);
|
||||||
}
|
}
|
||||||
|
} else if (!parsedDate) {
|
||||||
|
correctValue = '';
|
||||||
} else {
|
} else {
|
||||||
correctValue = oldValue;
|
correctValue = oldValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue