Commit 19b61e0adbd4ca15324386db2b137abbd869ecf0

Authored by Aresn
Committed by GitHub
2 parents a65aef1a b61002ba

Merge pull request #1994 from SergioCrisostomo/fix-nuxified-dates

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;