Re: javascript code to display the day
Here it is..
function showDay()
{
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday");
var dt = new Date(document.getElementById("date").value);
document.getElementById("day").value = dayarray[dt.getDay()];
}
you need to call this method when the event occurs for the calendar to show the date in the date field or you can include this into the script that is in the calendar.. which ever is feasible. The "date" field is supposed to be the textbox with date ( I did it for "MM/dd/yyyy" format) and the "day" field is the textbox where you want to display the date.
Logic: initialize the date as a Date object. The Date.getDay() gets you the day starting with 0 for Sunday and so on.
Hope this helps
__________________
My config: AMD Athlon x2 5600+, Asus M2NPV-VM, Transcend 2x1GB 800MHz, XFX 8600GT 256MB, Seagate 250GB SATA2 + Seagate 500GB SATA2, LG 1752s LCD, Sony DRU v200A DVDRW, Logitech MX518, iBall Benz cab
|