function weekDay(){
var date=$dp.cal.getP('y')+"-"+$dp.cal.getP('M')+"-"+$dp.cal.getP('d')+" "+showWeek($dp.cal.getP('w'));
this.value=date;//this代表當前input框
}
function showWeek(week){
var wk="";
switch(parseInt(week)){
case 0:
wk="星期日";
break;
case 1:
wk="星期一";
break;
case 2:
wk="星期二";
break;
case 3:
wk="星期三";
break;
case 4:
wk="星期四";
break;
case 5:
wk="星期五";
break;
case 6:
wk="星期六";
break;
}
return wk;
}
//頁面呼叫
onfocus="WdatePicker({isShowClear:false,firstDayOfWeek:1,onpicked:weekDay})"