Fix type passed when no value is given for timerange

This commit is contained in:
Sergio Crisostomo 2018-03-16 11:49:55 +01:00
parent 6bc3b19f22
commit 94790b84e7

View file

@ -334,7 +334,7 @@
if (typeof val === 'string') {
val = parser(val, format);
} else if (type === 'timerange') {
val = parser(val, format);
val = parser(val, format).map(v => v || '');
} else {
val = val.map(date => new Date(date)); // try to parse
val = val.map(date => isNaN(date.getTime()) ? null : date); // check if parse passed