PopUpCalendarDlg.js
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:1k
源码类别:
OA系统
开发平台:
Java
- function fPopUpCalendarDlg(currentvalue, minyear, maxyear)
- {
- showx = event.screenX - event.offsetX; // + deltaX;
- showy = event.screenY - event.offsetY+18; // + deltaY;
- newWINwidth = 210 + 4 + 18;
- var ddArguments = new Array(currentvalue ,minyear, maxyear);
- retval = window.showModalDialog("/Calendar/Calendar.htm", ddArguments,
- "dialogWidth:290px; dialogHeight:180px; dialogLeft:"+showx+
- "px; dialogTop:"+showy+
- "px; help:no; status:no; directories:yes;scrollbars:no;Resizable=no; ");
- if( retval != null )
- {
- return retval;
- }
- else
- {
- return currentvalue;
- }
- }
- function writeCookie(name, value, hours)
- {
- var expire = "";
- if(hours != null)
- {
- expire = new Date((new Date()).getTime() + hours * 3600000);
- expire = "; expires=" + expire.toGMTString();
- }
- document.cookie = name + "=" + escape(value) + expire;
- }
- function isDate(datestr)
- {
- if(datestr.length!=10)
- {
- return false;
- }
- else
- {
- var from_date= new Date(parseInt(datestr.substr(0,4),10),parseInt(datestr.substr(5,2),10)-1,parseInt(datestr.substr(8,2),10));
- if(isNaN(from_date)||from_date.getMonth()!=parseInt(datestr.substr(5,2),10)-1)
- {
- return false;
- }
- }
- return true;
- }