Commit 5c443a6d authored by lbortoli's avatar lbortoli

Fix for issue #1054

This is the fix for the issue "Problem parsing date on parseDate function when date is a string". The validation when 'date' is a number was wrong.
parent e83d0e78
......@@ -983,7 +983,7 @@ c3_chart_internal_fn.parseDate = function (date) {
parsedDate = date;
} else if (typeof date === 'string') {
parsedDate = $$.dataTimeFormat($$.config.data_xFormat).parse(date);
} else if (typeof date === 'number' || !isNaN(date)) {
} else if (typeof date === 'number' && !isNaN(date)) {
parsedDate = new Date(+date);
}
if (!parsedDate || isNaN(+parsedDate)) {
......
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