Commit b61002ba33a0eda5ad05df513b5e43144d3ac8c9
1 parent
a65aef1a
force string dates parse
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
src/components/date-picker/picker.vue
... | ... | @@ -514,6 +514,8 @@ |
514 | 514 | } else if (val && type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) { |
515 | 515 | val = val.join(RANGE_SEPARATOR); |
516 | 516 | val = parser(val, this.format || DEFAULT_FORMATS[type]); |
517 | + } else if (typeof val === 'string' && type.indexOf('time') !== 0 ){ | |
518 | + val = parser(val, this.format || DEFAULT_FORMATS[type]); | |
517 | 519 | } |
518 | 520 | |
519 | 521 | this.internalValue = val; | ... | ... |