Reputation: 211
is there an alternative for elem.style.color
because it doesnt render a different color in IE, only in firefox and in other browsers the code renders...
js fiddle works in firefox, not in IE
Upvotes: 0
Views: 42
Reputation:
This has nothing to do with styles, diffInDays
returns NaN
which is not comparable.
NaN < 0 -> false
NaN > 0 -> false
NaN == 0 -> false
Upvotes: 0
Reputation: 324650
var dateArray = dateElement.split("-");
var prevTime = new Date(dateArray);
Since you have dates already in the standard format (YYYY-MM-DD), just pass it in.
prevTime = new Date(dateElement);
Upvotes: 1