Commit b61002ba33a0eda5ad05df513b5e43144d3ac8c9

Authored by Sergio Crisostomo
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,6 +514,8 @@
514 } else if (val && type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) { 514 } else if (val && type === 'timerange' && Array.isArray(val) && val.length === 2 && !(val[0] instanceof Date) && !(val[1] instanceof Date)) {
515 val = val.join(RANGE_SEPARATOR); 515 val = val.join(RANGE_SEPARATOR);
516 val = parser(val, this.format || DEFAULT_FORMATS[type]); 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 this.internalValue = val; 521 this.internalValue = val;