<input type="text" onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',maxDate:'%y-{%M+1}-%d'})"/>
把 Calendar_GetDate 函数 修改为function Calendar_GetDate(y,m,d)
{
m=parseInt(m)<10 ? '0'+m:m//加
d=parseInt(d)<10 ? '0'+d:d//加
if(!Calendar_obj2||d!=0){
if(d>0){Calendar_obj.value=y+'-'+m+'-'+d}
else{
var objEvent=divCalendar.event||arguments.callee.caller.arguments[0]
var srcElement=objEvent.srcElement
if(!srcElement){srcElement=objEvent.target}
Calendar_obj.value=y+'-'+m+'-'+srcElement.innerHTML
}
}
else{
if(IsLeapYear(y) &&m==2){num=MonthDNum[m]+1}
else{num=MonthDNum[m]}
Calendar_obj.value=y+'-'+m+'-1'
Calendar_obj2.value=y+'-'+m+'-'+num
}
就加 m=parseInt(m)<10 ? '0'+m:m//加
d=parseInt(d)<10 ? '0'+d:d//加
这两行代码就可以了