fixed DatePicker event when type = daterange

fixed DatePicker event when type = daterange
This commit is contained in:
梁灏 2016-12-27 17:55:13 +08:00
parent af713093ab
commit 0fd1369660

View file

@ -414,7 +414,12 @@
TYPE_VALUE_RESOLVER_MAP['default']
).formatter;
this.$emit('on-change', formatter(date, format));
let newDate = formatter(date, format);
if (this.type === 'daterange') {
newDate = [newDate.split(RANGE_SEPARATOR)[0], newDate.split(RANGE_SEPARATOR)[1]];
}
this.$emit('on-change', newDate);
}
},
watch: {