Commit 77883b8c69cb2c77ebab435e265393ad6c6f2c0f
1 parent
a65aef1a
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 | } |