From 8c16b3014950de8af44d41e16f718f766b39cb0f Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Wed, 24 Jan 2018 15:07:09 +0100 Subject: [PATCH] return empty strings for invalid dates instead of `null` --- src/components/date-picker/picker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index aa82060..14c5673 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -187,7 +187,7 @@ return this.internalValue.slice(); } else { const isRange = this.type.includes('range'); - const val = this.internalValue.map(date => date instanceof Date ? new Date(date) : date); + const val = this.internalValue.map(date => date instanceof Date ? new Date(date) : (date || '')); return (isRange || this.multiple) ? val : val[0]; } }, -- libgit2 0.21.4