function CalendarCellsClick(oCell,oInstance)
{
var sDay,sMonth,sYear, sHour,sMinute,sSecond,newDate;
sYear=oInstance.currDate.getFullYear();
sMonth=oInstance.currDate.getMonth();
sDay=oInstance.currDate.getDate();
//+stz
sHour=document.getElementById(oInstance.sHOURID).value.trim();//oInstance.currDate.getHours();
sMinute=document.getElementById(oInstance.sMINUTEID).value.trim();//oInstance.currDate.getMinutes();
sSecond=document.getElementById(oInstance.sSECONDID).value.trim();//oInstance.currDate.getSeconds();
//+stz
var checkedTime=checkTime(sHour,sMinute,sSecond,oInstance);
sHour=checkedTime[0];
sMinute=checkedTime[1];
sSecond=checkedTime[2];
//ie 只要判断 oCell.innerText!=" "
//alert(parseInt(oCell.innerText));
if(parseInt(oCell.innerText))
{ //alert(oCell.childNodes[0].nodeType);
sDay=parseInt(oCell.innerText);
if(sDay!=oInstance.currDate.getDate())
{
newDate=new Date(sYear,sMonth,sDay,sHour,sMinute,sSecond);
oInstance.Refresh(newDate);
}
}
sDateString=sYear+oInstance.separator+CalendarDblNum(sMonth+1)+oInstance.separator+CalendarDblNum(sDay)+ " "+CalendarDblNum(sHour)+oInstance.separatorTime+CalendarDblNum(sMinute)+oInstance.separatorTime+CalendarDblNum(sSecond) ; //alert(sDateString); ///+stz return sDateString
if(oInstance.oTaget.tagName.toLowerCase()=="input") oInstance.oTaget.value = sDateString;
CalendarCancel(oInstance);
return sDateString;
}
function CalendarTodayClick(oInstance) /// "Today" button Change
{
oInstance.Refresh(new Date());
// add by stz
var sDay,sMonth,sYear, sHour,sMinute,sSecond,newDate;
sYear=oInstance.currDate.getFullYear();
sMonth=oInstance.currDate.getMonth();
sDay=oInstance.currDate.getDate();
sHour=document.getElementById(oInstance.sHOURID).value.trim();//oInstance.currDate.getHours();
sMinute=document.getElementById(oInstance.sMINUTEID).value.trim();//oInstance.currDate.getMinutes();
sSecond=document.getElementById(oInstance.sSECONDID).value.trim();//oInstance.currDate.getSeconds();
var checkedTime=checkTime(sHour,sMinute,sSecond,oInstance);
sHour=checkedTime[0];
sMinute=checkedTime[1];
sSecond=checkedTime[2];
sDateString=sYear+oInstance.separator+CalendarDblNum(sMonth+1)+oInstance.separator+CalendarDblNum(sDay)+ " "+CalendarDblNum(sHour)+oInstance.separatorTime+CalendarDblNum(sMinute)+oInstance.separatorTime+CalendarDblNum(sSecond);
if(oInstance.oTaget.tagName.toLowerCase()=="input") oInstance.oTaget.value = sDateString;
CalendarCancel(oInstance);
// add by stz
}
{
var sDay,sMonth,sYear, sHour,sMinute,sSecond,newDate;
sYear=oInstance.currDate.getFullYear();
sMonth=oInstance.currDate.getMonth();
sDay=oInstance.currDate.getDate();
//+stz
sHour=document.getElementById(oInstance.sHOURID).value.trim();//oInstance.currDate.getHours();
sMinute=document.getElementById(oInstance.sMINUTEID).value.trim();//oInstance.currDate.getMinutes();
sSecond=document.getElementById(oInstance.sSECONDID).value.trim();//oInstance.currDate.getSeconds();
//+stz
var checkedTime=checkTime(sHour,sMinute,sSecond,oInstance);
sHour=checkedTime[0];
sMinute=checkedTime[1];
sSecond=checkedTime[2];
//ie 只要判断 oCell.innerText!=" "
//alert(parseInt(oCell.innerText));
if(parseInt(oCell.innerText))
{ //alert(oCell.childNodes[0].nodeType);
sDay=parseInt(oCell.innerText);
if(sDay!=oInstance.currDate.getDate())
{
newDate=new Date(sYear,sMonth,sDay,sHour,sMinute,sSecond);
oInstance.Refresh(newDate);
}
}
sDateString=sYear+oInstance.separator+CalendarDblNum(sMonth+1)+oInstance.separator+CalendarDblNum(sDay)+ " "+CalendarDblNum(sHour)+oInstance.separatorTime+CalendarDblNum(sMinute)+oInstance.separatorTime+CalendarDblNum(sSecond) ; //alert(sDateString); ///+stz return sDateString
if(oInstance.oTaget.tagName.toLowerCase()=="input") oInstance.oTaget.value = sDateString;
CalendarCancel(oInstance);
return sDateString;
}
function CalendarTodayClick(oInstance) /// "Today" button Change
{
oInstance.Refresh(new Date());
// add by stz
var sDay,sMonth,sYear, sHour,sMinute,sSecond,newDate;
sYear=oInstance.currDate.getFullYear();
sMonth=oInstance.currDate.getMonth();
sDay=oInstance.currDate.getDate();
sHour=document.getElementById(oInstance.sHOURID).value.trim();//oInstance.currDate.getHours();
sMinute=document.getElementById(oInstance.sMINUTEID).value.trim();//oInstance.currDate.getMinutes();
sSecond=document.getElementById(oInstance.sSECONDID).value.trim();//oInstance.currDate.getSeconds();
var checkedTime=checkTime(sHour,sMinute,sSecond,oInstance);
sHour=checkedTime[0];
sMinute=checkedTime[1];
sSecond=checkedTime[2];
sDateString=sYear+oInstance.separator+CalendarDblNum(sMonth+1)+oInstance.separator+CalendarDblNum(sDay)+ " "+CalendarDblNum(sHour)+oInstance.separatorTime+CalendarDblNum(sMinute)+oInstance.separatorTime+CalendarDblNum(sSecond);
if(oInstance.oTaget.tagName.toLowerCase()=="input") oInstance.oTaget.value = sDateString;
CalendarCancel(oInstance);
// add by stz
}