From b61002ba33a0eda5ad05df513b5e43144d3ac8c9 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Tue, 26 Sep 2017 13:30:25 +0200 Subject: [PATCH] force string dates parse --- src/components/date-picker/picker.vue | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index d54fa7d..1abcc52 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -514,6 +514,8 @@ } else if (val && type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) { val = val.join(RANGE_SEPARATOR); val = parser(val, this.format || DEFAULT_FORMATS[type]); + } else if (typeof val === 'string' && type.indexOf('time') !== 0 ){ + val = parser(val, this.format || DEFAULT_FORMATS[type]); } this.internalValue = val; -- libgit2 0.21.4