Commit 8c16b3014950de8af44d41e16f718f766b39cb0f
1 parent
72f225e9
return empty strings for invalid dates instead of `null`
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/components/date-picker/picker.vue
... | ... | @@ -187,7 +187,7 @@ |
187 | 187 | return this.internalValue.slice(); |
188 | 188 | } else { |
189 | 189 | const isRange = this.type.includes('range'); |
190 | - const val = this.internalValue.map(date => date instanceof Date ? new Date(date) : date); | |
190 | + const val = this.internalValue.map(date => date instanceof Date ? new Date(date) : (date || '')); | |
191 | 191 | return (isRange || this.multiple) ? val : val[0]; |
192 | 192 | } |
193 | 193 | }, | ... | ... |