日期選擇控制項

2021-04-02 09:04:33 字數 1781 閱讀 7332

呼叫方法

////

/////日曆開始

var date_start,date_end,g_object

var today = new date();

var separator="-";

var inover=false;

//mode :時間變換的型別0-年 1-月 2-直接選擇月

function change_date(temp,mode)

else

}}  

else            

else}}

window.cele_date.focus();

}//初始化日曆

function init(d_start,d_end)

temp_str+="-";

temp_str+=""

temp_str+=""

for (i=1;i<=12;i++)

temp_str+="-";

temp_str+=""

temp_str+=">/" οnclick=/"change_date(1,1)/" οnmοuseοver=/"getlayerfocus()/"  style=/"color: #000099; background-color: #bfbfbf; cursor: hand/">";

temp_str+="

"temp_str+="日

";temp_str+="一

"; temp_str+="二

"; temp_str+="三

"temp_str+="四

";temp_str+="五

"; temp_str+="六

";for (i=1 ;i<=6 ;i++)

temp_str+=""        

}temp_str+="

";window.cele_date.innerhtml=temp_str;

}function set_cele_date(year,month)

while(month-1==nd.getmonth())

if (nd>date_end || nddocument.body.clientwidth) window.cele_date.style.posleft+=ep.offsetwidth-window.cele_date.clientwidth;

if (d_start!="")else

}else

if (d_end!="")else

g_object=t_object

cur_d=new date()

set_cele_date(cur_d.getyear(),cur_d.getmonth()+1);

window.cele_date.style.display="block";

window.cele_date.focus();

}function td_click(t_object);}

}function h_cele_date()

function overcolor(obj)

function outcolor(obj)

function getnow(o)

if(day<10)

o.value=year+separator+month+separator+day;

}function hilayer()

}function getlayerfocus()

function lostlayerfocus()

init();

//日曆結束

日期選擇下拉列表小控制項

using system using system.componentmodel using system.text using system.web using system.web.ui using system.web.ui.webcontrols assembly tagprefix efp...

js日期選擇控制項layDate api手冊

js日期選擇控制項laydate api手冊 一 核心方法 laydate options options是乙個物件,它包含了以下key 預設值 elem id 需顯示日期的元素選擇器 event click 觸發事件 format yyyy mm dd hh mm ss 日期格式 istime f...

Calendar日期選擇控制項的使用

作者資訊和本宣告。否則將追究法律責任。calendar web控制項是日期選擇器控制項,用來以月曆的形式顯示日期。1 在表單上新增乙個標籤,id值 lbl date,text屬性為 請選擇日期 乙個文字框,id值 txt date,乙個影象按扭,id值 ibtn date,乙個日期控制項,id ca...