Commit 5bd5dd59181e4da212bad3d75366de78e2b624f5

Authored by Aresn
Committed by GitHub
2 parents 1d8334dd 77883b8c

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 }