Merge pull request #2120 from SergioCrisostomo/fix-2119

correct behaviour when initialising date-picker with a empty string
This commit is contained in:
Aresn 2017-10-17 19:52:02 -05:00 committed by GitHub
commit 95dfbe1bc4
2 changed files with 27 additions and 12 deletions

View file

@ -517,7 +517,7 @@
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]);
val = parser(val, this.format || DEFAULT_FORMATS[type]) || val;
}
this.internalValue = val;