1、/自定义定位偏移量 2007-02-11 由 寒羽枫添加 if(document.getElementById(ContainerPanel)=null)InitContainerPanel(); var date = new Date(); var by = date.getFullYear()-50; /最小值 50 年前 var ey = date.getFullYear()+50; /最大值 50 年后 /cal = new Calendar(by, ey,1,strFormat); /初始化英文版,0 为中文版 cal = (cal=null) ? new Calendar(by,
2、ey, 0) : cal; /不用每次都初始化 2006-12-03 修正 cal.DateMode =pickMode; /复位 if(strFormat.indexOf(s) 0) ? ev.indexOf() + 20 :) + 1) , ev.lastIndexOf();/去除验证函数 ValidatorOnChange(); var fun = new Function(ev); /重新定义函数 this.dateControl.changeEvent = fun; this.dateControl.changeEvent();/触发自定义 changeEvent 函数* 日历类 b
3、eginYear 1990 endYear 2010 lang 0(中文)|1(英语) 可自由扩充 dateFormatStyleyyyy-MM-dd;* version 2006-04-01 KimSoft (jinqinghua at )* updatefunction Calendar(beginYear, endYear, lang, dateFormatStyle) this.beginYear = 1950; this.endYear = 2050; this.lang = 0; /0(中文) | 1(英文) this.dateFormatStyle = yyyy-MM-dd hh
4、:mm:ss if (beginYear != null & endYear != null) this.beginYear = beginYear; this.endYear = endYear; if (lang ! this.lang = lang if (dateFormatStyle ! this.dateFormatStyle = dateFormatStyle this.dateControl = null; this.panel = this.getElementById(calendarPanel this.container = this.getElementById( t
5、his.form = null; this.date = new Date(); this.year = this.date.getFullYear(); this.month = this.date.getMonth(); this.day = this.date.getDate(); this.hour = this.date.getHours(); this.minute = this.date.getMinutes(); this.second = this.date.getSeconds(); this.colors = cur_word#FFFFFF, /当日日期文字颜色cur_b
6、g#00FF00 /当日日期单元格背影色sel_bg#FFCCCC /已被选择的日期单元格背影色 2006-12-03 寒羽枫添加sun_word#FF0000 /星期天文字颜色sat_word#0000FF /星期六文字颜色td_word_light#333333 /单元格文字颜色td_word_dark#CCCCCC /单元格文字暗色td_bg_out#EFEFEF /单元格背影色td_bg_over#FFCC00tr_word /日历头文字颜色tr_bg#666666 /日历头背影色input_border /input控件的边框颜色input_bg /input控件的背影色/* /20
7、08-01-29 放到了 show ,因为要做 pickMode 判断 this.draw(); this.bindYear(); this.bindMonth(); */ /this.changeSelect(); /this.bindData(); /2006-12-30 由民工.砖家注释* 日历类属性(语言包,可自由扩展)Calendar.language = , ,months一月,二月三月四月五月六月七月八月九月十月十一月十二月, JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC ,weeks日一二三四五六SUNMONTURWEDTHUFRISAT时H分M秒c
8、lear清空CLStoday今天TODAYpickTxt确定OK,/pickMode 精确到年、月时把今天变成“确定”close关闭CLOSECalendar.prototype.draw = function() calendar = this; var mvAry = ; /mvArymvAry.length = /因 不能嵌套, 2006-12-01 由寒羽枫改用 Div mvArymvAry.lengthdiv name=table width=100% border=0 cellpadding= cellspacing=1font-size:12px;trth align=left
9、width=1% pickMode)mvArymvAry.lengthdisplay:none;/pickMode 精确到年时隐藏“月” = name=prevMonth type=button id= value=lt; /thcenter98% nowrap=nowrapselect name=calendarYear/selectcalendarMonthrightnextMonthgt;/tr/tabletable id=calendarTable0px solid #CCCCCC;#FFFFFF;= pickMode/pickMode 精确到年、月时隐藏“天”3 for(var i = 0; i 7; i+) th style=font-weight:normal;backgro
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1