2000-10-10 -> Invalid Date, must use 2000/10/10 format in some browers
@@ -63,7 +63,7 @@ function offsetWeek (week, offset) {
}
export function toDate (val) {
- return val && new Date(val)
+ return val && new Date(typeof val === 'string' ? val.replace(/-/g, '/') : val)
export function pickMax (a, b) {