Commit a4eb891a authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

DatePicker: fix initial value of [] in range type

parent 58542b3a
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment