am using date picker ,when i choose the date , it shows lik 28/02/2012, i need to get the day(tuesday) from the date .am using lik this,
function date()
{
var dt = $get("<%=deliveryTime.ClientID %>").value;
var d = new Date(dt);
var weekday = new Array(7);
weekday[0] = "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";
var dtday = weekday[d.getDay()];
}
In IE its working fine , But in mozilla ,it shows undefined,but instead of this
( var dtday = weekday[d.getDay()];),
if am using
document.write("Today is " + weekday[d.getDay()]);
it shows the correct day , How could i get the day in mozilla
[edit]Code block added - OriginalGriff[/edit]