Commit 5bd5dd59181e4da212bad3d75366de78e2b624f5
Committed by
GitHub
Merge pull request #2002 from SergioCrisostomo/avoid-throw-if-wrong-input
Return empty string if the date input doesn't parse
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
src/components/date-picker/picker.vue
@@ -366,6 +366,8 @@ | @@ -366,6 +366,8 @@ | ||
366 | } else { | 366 | } else { |
367 | correctValue = formatDate(parsedDate, format); | 367 | correctValue = formatDate(parsedDate, format); |
368 | } | 368 | } |
369 | + } else if (!parsedDate) { | ||
370 | + correctValue = ''; | ||
369 | } else { | 371 | } else { |
370 | correctValue = oldValue; | 372 | correctValue = oldValue; |
371 | } | 373 | } |