Link to home
Start Free TrialLog in
Avatar of maddisoncr
maddisoncr

asked on

Datatables date format problem

I'm using datatables with my project and i'm trying to display several dates.

It works fine in Chrome but not in firefox. In firefox the dates are shown as Nan

Any ideas

Here's a link

http://cloud-contractor.co.uk/etest.php
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Just so you know, in IE 11 it also displays NaN for the dates. NaN stands for "Not a Number".

I don't think this problem is with the date handling code because this:

<html>
<head>
<script>
function getValue()
  {
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1;
var curr_year = d.getFullYear();
var newdate= (curr_date + "/" + curr_month + "/" + curr_year);
alert(newdate);
}
</script>
</head>
<body>

<h1 id="myHeader" onclick="getValue()">Click me!</h1>

</body>
</html>

Open in new window


This works just fine in FF and IE 11.

Hope this helps.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maddisoncr
maddisoncr

ASKER

thank you guys for the quick responses :-)