return empty strings for invalid dates instead of null

This commit is contained in:
Sergio Crisostomo 2018-01-24 15:07:09 +01:00
parent 72f225e938
commit 8c16b30149

View file

@ -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];
}
},