Commit f4f34695fdcc2c4f0c06357f096fa53681ffb4ae

Authored by Aresn
Committed by GitHub
2 parents 6bc3b19f 94790b84

Merge pull request #3177 from SergioCrisostomo/fix-3161

Fix type passed when no value is given for timerange
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/components/date-picker/picker.vue
... ... @@ -334,7 +334,7 @@
334 334 if (typeof val === 'string') {
335 335 val = parser(val, format);
336 336 } else if (type === 'timerange') {
337   - val = parser(val, format);
  337 + val = parser(val, format).map(v => v || '');
338 338 } else {
339 339 val = val.map(date => new Date(date)); // try to parse
340 340 val = val.map(date => isNaN(date.getTime()) ? null : date); // check if parse passed
... ...