hi,
I wanna incorporate the pop up calendar in my html page.
i have three textboxes,beside it i have three individual calendar icons. when i click the icon the calendar should pop up and the selected date should go into appropriate text box.
please help
var calendarWindow = ""; var DateStr = ""; function GetDayofWk(){ DateStr = calendarWindow.document.Calendar.value; temp = new String(DateStr); startSlice = temp.indexOf(' '); DayofWk = temp.substring(startSlice-3,startSlice); return DayofWk; } function GetMonthNmbr(){ tmpStr = calendarWindow.document.Calendar.month; return tmpStr; } function GetDayNmbr(){ tmpStr = calendarWindow.document.Calendar.day; return tmpStr; } function GetYear(){ tmpStr = calendarWindow.document.Calendar.year; return tmpStr; } function refreshInfo() { nWkday = GetDayofWk(); xMonth = GetMonthNmbr(); xDay = GetDayNmbr(); xYear = GetYear(); dateStr = xMonth+"/"+xDay+"/"+xYear; Form1.selectedDate.value = dateStr; Form1.dayName.value = nWkday; closeCalendar(); } function openCalendar(){ if (calendarWindow != ""){calendarWindow.close();} calendarWindow =window.open("popCalendar.html","calWin","toolbar=0,scrollbars=0,statusbar=0,height=220,width=390,top=50,left=380"); calendarWindow.document.title = "Calendar"; } function closeCalendar(){ if (calendarWindow != ""){calendarWindow.close()} } window.onunload=closeCalendar;
Help @santhosh spread the word by sharing this article on Twitter...