DatePicker: fix initial value of [] in range type

pull/7241/head
Leopoldthecoder 2017-09-27 08:26:43 +08:00 committed by 杨奕
parent 58542b3a5e
commit a4eb891a21
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@
const calcDefaultValue = defaultValue => {
if (Array.isArray(defaultValue)) {
return new Date(defaultValue[0]);
return defaultValue[0] ? new Date(defaultValue[0]) : new Date();
} else {
return new Date(defaultValue);
}