Commit 94790b84e79640bb9daaa2d30e4460a3167aba59

Authored by Sergio Crisostomo
1 parent 6bc3b19f

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
... ...