Code
本想在asp.net加这个控件的,整了半天,还是不行,IE 6下通不过, FF可以用,但有时也会报错,单把代码片段copy出去执行又没事。郁闷死。

string calenderScript = "<script type='text/javascript'> function catcalc(cal) { } Calendar.setup({ inputField : \"";
calenderScript += this.txtStoredTime.ClientID + "\", ifFormat : \"%Y-%m-%d %H:%M\", showsTime : true,";
calenderScript += " timeFormat : \"24\", onUpdate : catcalc })</script>";
string csname = "calendarInclude";
string strUrl1 = "js/calendar.js";
string strUrl2 = "js/calendar-setup.js";
string strUrl3 = "js/calendar-zh.js";
Type cstype = this.GetType();
ClientScriptManager manager = Page.ClientScript;
if (!manager.IsClientScriptIncludeRegistered(cstype, csname))
{
manager.RegisterClientScriptInclude(cstype, "calendarjs", strUrl1);
manager.RegisterClientScriptInclude(cstype, "calendarsetup", strUrl2);
manager.RegisterClientScriptInclude(cstype, "calendarzh", strUrl3);
}