hi experts
I have a javascript calendar which displays date with future dates disabled. But i also want to display the time along with the date. any sugession how i can do that. any code greatly appreciated.
here is the code below which displays only the date but not time
++++++++++++++++++++++++++
++++++++++
++++++++++
+++++++
//calendar which disables future dates
/* SOURCE FILE: AnchorPosition.js */
function getAnchorPosition(anchorna
me){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if(docume
nt.getElem
entById){u
se_gebi=tr
ue;}else if(document.all){use_css=t
rue;}else if(document.layers){use_la
yers=true;
}if(use_ge
bi && document.all){x=AnchorPosi
tion_getPa
geOffsetLe
ft(documen
t.all[anch
orname]);y
=AnchorPos
ition_getP
ageOffsetT
op(documen
t.all[anch
orname]);}
else if(use_gebi){var o=document.getElementById(
anchorname
);x=Anchor
Position_g
etPageOffs
etLeft(o);
y=AnchorPo
sition_get
PageOffset
Top(o);}el
se if(use_css){x=AnchorPositi
on_getPage
OffsetLeft
(document.
all[anchor
name]);y=A
nchorPosit
ion_getPag
eOffsetTop
(document.
all[anchor
name]);}el
se if(use_layers){var found=0;for(var i=0;i<document.anchors.len
gth;i++){i
f(document
.anchors[i
].name==an
chorname){
found=1;br
eak;}}if(f
ound==0){c
oordinates
.x=0;coord
inates.y=0
;return coordinates;}x=document.an
chors[i].x
;y=documen
t.anchors[
i].y;}else
{coordinat
es.x=0;coo
rdinates.y
=0;return coordinates;}coordinates.x
=x;coordin
ates.y=y;r
eturn coordinates;}
function getAnchorWindowPosition(an
chorname){
var coordinates=getAnchorPosit
ion(anchor
name);var x=0;var y=0;if(document.getElement
ById){if(i
sNaN(windo
w.screenX)
){x=coordi
nates.x-do
cument.bod
y.scrollLe
ft+window.
screenLeft
;y=coordin
ates.y-doc
ument.body
.scrollTop
+window.sc
reenTop;}e
lse{x=coor
dinates.x+
window.scr
eenX+(wind
ow.outerWi
dth-window
.innerWidt
h)-window.
pageXOffse
t;y=coordi
nates.y+wi
ndow.scree
nY+(window
.outerHeig
ht-24-wind
ow.innerHe
ight)-wind
ow.pageYOf
fset;}}els
e if(document.all){x=coordin
ates.x-doc
ument.body
.scrollLef
t+window.s
creenLeft;
y=coordina
tes.y-docu
ment.body.
scrollTop+
window.scr
eenTop;}el
se if(document.layers){x=coor
dinates.x+
window.scr
eenX+(wind
ow.outerWi
dth-window
.innerWidt
h)-window.
pageXOffse
t;y=coordi
nates.y+wi
ndow.scree
nY+(window
.outerHeig
ht-24-wind
ow.innerHe
ight)-wind
ow.pageYOf
fset;}coor
dinates.x=
x;coordina
tes.y=y;re
turn coordinates;}
function AnchorPosition_getPageOffs
etLeft(el)
{var ol=el.offsetLeft;while((el
=el.offset
Parent) != null){ol += el.offsetLeft;}return ol;}
function AnchorPosition_getWindowOf
fsetLeft(e
l){return AnchorPosition_getPageOffs
etLeft(el)
-document.
body.scrol
lLeft;}
function AnchorPosition_getPageOffs
etTop(el){
var ot=el.offsetTop;while((el=
el.offsetP
arent) != null){ot += el.offsetTop;}return ot;}
function AnchorPosition_getWindowOf
fsetTop(el
){return AnchorPosition_getPageOffs
etTop(el)-
document.b
ody.scroll
Top;}
/* SOURCE FILE: date.js */
var MONTH_NAMES=new Array('January','February'
,'March','
April','Ma
y','June',
'July','Au
gust','Sep
tember','O
ctober','N
ovember','
December',
'Jan','Feb
','Mar','A
pr','May',
'Jun','Jul
','Aug','S
ep','Oct',
'Nov','Dec
');var DAY_NAMES=new Array('Sunday','Monday','T
uesday','W
ednesday',
'Thursday'
,'Friday',
'Saturday'
,'Sun','Mo
n','Tue','
Wed','Thu'
,'Fri','Sa
t');
function LZ(x){return(x<0||x>9?"":"
0")+x}
function isDate(val,format){var date=getDateFromFormat(val
,format);i
f(date==0)
{return false;}return true;}
function compareDates(date1,datefor
mat1,date2
,dateforma
t2){var d1=getDateFromFormat(date1
,dateforma
t1);var d2=getDateFromFormat(date2
,dateforma
t2);if(d1=
=0 || d2==0){return -1;}else if(d1 > d2){return 1;}return 0;}
function formatDate(date,format){fo
rmat=forma
t+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,
ss,ampm,HH
,H,KK,K,kk
,k;var value=new Object();if(y.length < 4){y=""+(y-0+1900);}value[
"y"]=""+y;
value["yyy
y"]=y;valu
e["yy"]=y.
substring(
2,4);value
["M"]=M;va
lue["MM"]=
LZ(M);valu
e["MMM"]=M
ONTH_NAMES
[M-1];valu
e["NNN"]=M
ONTH_NAMES
[M+11];val
ue["d"]=d;
value["dd"
]=LZ(d);va
lue["E"]=D
AY_NAMES[E
+7];value[
"EE"]=DAY_
NAMES[E];v
alue["H"]=
H;value["H
H"]=LZ(H);
if(H==0){v
alue["h"]=
12;}else if(H>12){value["h"]=H-12;}
else{value
["h"]=H;}v
alue["hh"]
=LZ(value[
"h"]);if(H
>11){value
["K"]=H-12
;}else{val
ue["K"]=H;
}value["k"
]=H+1;valu
e["KK"]=LZ
(value["K"
]);value["
kk"]=LZ(va
lue["k"]);
if(H > 11){value["a"]="PM";}else{
value["a"]
="AM";}val
ue["m"]=m;
value["mm"
]=LZ(m);va
lue["s"]=s
;value["ss
"]=LZ(s);w
hile(i_for
mat < format.length){c=format.ch
arAt(i_for
mat);token
="";while(
(format.ch
arAt(i_for
mat)==c) &&(i_format < format.length)){token += format.charAt(i_format++);
}if(value[
token] != null){result=result + value[token];}else{result=
result + token;}}return result;}
function _isInteger(val){var digits="1234567890";for(va
r i=0;i < val.length;i++){if(digits.
indexOf(va
l.charAt(i
))==-1){re
turn false;}}return true;}
function _getInt(str,i,minlength,ma
xlength){f
or(var x=maxlength;x>=minlength;x
--){var token=str.substring(i,i+x)
;if(token.
length < minlength){return null;}if(_isInteger(token)
){return token;}}return null;}
function getDateFromFormat(val,form
at){val=va
l+"";forma
t=format+"
";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date();var year=now.getYear();var month=now.getMonth()+1;var
date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format < format.length){c=format.ch
arAt(i_for
mat);token
="";while(
(format.ch
arAt(i_for
mat)==c) &&(i_format < format.length)){token += format.charAt(i_format++);
}if(token=
="yyyy" || token=="yy" || token=="y"){if(token=="yyy
y"){x=4;y=
4;}if(toke
n=="yy"){x
=2;y=2;}if
(token=="y
"){x=2;y=4
;}year=_ge
tInt(val,i
_val,x,y);
if(year==n
ull){retur
n 0;}i_val += year.length;if(year.length
==2){if(ye
ar > 70){year=1900+(year-0);}el
se{year=20
00+(year-0
);}}}else if(token=="MMM"||token=="N
NN"){month
=0;for(var
i=0;i<MONTH_NAMES.length;i
++){var month_name=MONTH_NAMES[i];
if(val.sub
string(i_v
al,i_val+m
onth_name.
length).to
LowerCase(
)==month_n
ame.toLowe
rCase()){i
f(token=="
MMM"||(tok
en=="NNN"&
&i>11)){mo
nth=i+1;if
(month>12)
{month -= 12;}i_val += month_name.length;break;}}
}if((month
< 1)||(month>12)){return 0;}}else if(token=="EE"||token=="E"
){for(var i=0;i<DAY_NAMES.length;i++
){var day_name=DAY_NAMES[i];if(v
al.substri
ng(i_val,i
_val+day_n
ame.length
).toLowerC
ase()==day
_name.toLo
werCase())
{i_val += day_name.length;break;}}}e
lse if(token=="MM"||token=="M"
){month=_g
etInt(val,
i_val,toke
n.length,2
);if(month
==null||(m
onth<1)||(
month>12))
{return 0;}i_val+=month.length;}el
se if(token=="dd"||token=="d"
){date=_ge
tInt(val,i
_val,token
.length,2)
;if(date==
null||(dat
e<1)||(dat
e>31)){ret
urn 0;}i_val+=date.length;}els
e if(token=="hh"||token=="h"
){hh=_getI
nt(val,i_v
al,token.l
ength,2);i
f(hh==null
||(hh<1)||
(hh>12)){r
eturn 0;}i_val+=hh.length;}else if(token=="HH"||token=="H"
){hh=_getI
nt(val,i_v
al,token.l
ength,2);i
f(hh==null
||(hh<0)||
(hh>23)){r
eturn 0;}i_val+=hh.length;}else if(token=="KK"||token=="K"
){hh=_getI
nt(val,i_v
al,token.l
ength,2);i
f(hh==null
||(hh<0)||
(hh>11)){r
eturn 0;}i_val+=hh.length;}else if(token=="kk"||token=="k"
){hh=_getI
nt(val,i_v
al,token.l
ength,2);i
f(hh==null
||(hh<1)||
(hh>24)){r
eturn 0;}i_val+=hh.length;hh--;}
else if(token=="mm"||token=="m"
){mm=_getI
nt(val,i_v
al,token.l
ength,2);i
f(mm==null
||(mm<0)||
(mm>59)){r
eturn 0;}i_val+=mm.length;}else if(token=="ss"||token=="s"
){ss=_getI
nt(val,i_v
al,token.l
ength,2);i
f(ss==null
||(ss<0)||
(ss>59)){r
eturn 0;}i_val+=ss.length;}else if(token=="a"){if(val.subs
tring(i_va
l,i_val+2)
.toLowerCa
se()=="am"
){ampm="AM
";}else if(val.substring(i_val,i_v
al+2).toLo
werCase()=
="pm"){amp
m="PM";}el
se{return 0;}i_val+=2;}else{if(val.s
ubstring(i
_val,i_val
+token.len
gth)!=toke
n){return 0;}else{i_val+=token.lengt
h;}}}if(i_
val != val.length){return 0;}if(month==2){if( ((year%4==0)&&(year%100 != 0) ) ||(year%400==0) ){if(date > 29){return 0;}}else{if(date > 28){return 0;}}}if((month==4)||(month
==6)||(mon
th==9)||(m
onth==11))
{if(date > 30){return 0;}}if(hh<12 && ampm=="PM"){hh=hh-0+12;}el
se if(hh>11 && ampm=="AM"){hh-=12;}var newdate=new Date(year,month-1,date,hh,
mm,ss);ret
urn newdate.getTime();}
function parseDate(val){var preferEuro=(arguments.leng
th==2)?arg
uments[1]:
false;gene
ralFormats
=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','
MMM d');monthFirst=new Array('M/d/y','M-d-y','M.d
.y','MMM-d
','M/d','M
-d');dateF
irst =new Array('d/M/y','d-M-y','d.M
.y','d-MMM
','d/M','d
-M');var checkList=new Array('generalFormats',pre
ferEuro?'d
ateFirst':
'monthFirs
t',preferE
uro?'month
First':'da
teFirst');
var d=null;for(var i=0;i<checkList.length;i++
){var l=window[checkList[i]];for
(var j=0;j<l.length;j++){d=getD
ateFromFor
mat(val,l[
j]);if(d!=
0){return new Date(d);}}}return null;}
/* SOURCE FILE: PopupWindow.js */
function PopupWindow_getXYPosition(
anchorname
){var coordinates;if(this.type == "WINDOW"){coordinates = getAnchorWindowPosition(an
chorname);
}else{coor
dinates = getAnchorPosition(anchorna
me);}this.
x = coordinates.x;this.y = coordinates.y;}
function PopupWindow_setSize(width,
height){th
is.width = width;this.height = height;}
function PopupWindow_populate(conte
nts){this.
contents = contents;this.populated = false;}
function PopupWindow_setUrl(url){th
is.url = url;}
function PopupWindow_setWindowPrope
rties(prop
s){this.wi
ndowProper
ties = props;}
function PopupWindow_refresh(){if(t
his.divNam
e != null){if(this.use_gebi){do
cument.get
ElementByI
d(this.div
Name).inne
rHTML = this.contents;}else if(this.use_css){document.
all[this.d
ivName].in
nerHTML = this.contents;}else if(this.use_layers){var d = document.layers[this.divNa
me];d.docu
ment.open(
);d.docume
nt.writeln
(this.cont
ents);d.do
cument.clo
se();}}els
e{if(this.
popupWindo
w != null && !this.popupWindow.closed){
if(this.ur
l!=""){thi
s.popupWin
dow.locati
on.href=th
is.url;}el
se{this.po
pupWindow.
document.o
pen();this
.popupWind
ow.documen
t.writeln(
this.conte
nts);this.
popupWindo
w.document
.close();}
this.popup
Window.foc
us();}}}
function PopupWindow_showPopup(anch
orname){th
is.getXYPo
sition(anc
horname);t
his.x += this.offsetX;this.y += this.offsetY;if(!this.popu
lated &&(this.contents != "")){this.populated = true;this.refresh();}if(th
is.divName
!= null){if(this.use_gebi){do
cument.get
ElementByI
d(this.div
Name).styl
e.left = this.x + "px";document.getElementBy
Id(this.di
vName).sty
le.top = this.y + "px";document.getElementBy
Id(this.di
vName).sty
le.visibil
ity = "visible";}else if(this.use_css){document.
all[this.d
ivName].st
yle.left = this.x;document.all[this.d
ivName].st
yle.top = this.y;document.all[this.d
ivName].st
yle.visibi
lity = "visible";}else if(this.use_layers){docume
nt.layers[
this.divNa
me].left = this.x;document.layers[thi
s.divName]
.top = this.y;document.layers[thi
s.divName]
.visibilit
y = "visible";}}else{if(this.p
opupWindow
== null || this.popupWindow.closed){i
f(this.x<0
){this.x=0
;}if(this.
y<0){this.
y=0;}if(sc
reen && screen.availHeight){if((th
is.y + this.height) > screen.availHeight){this.y
= screen.availHeight - this.height;}}if(screen && screen.availWidth){if((thi
s.x + this.width) > screen.availWidth){this.x = screen.availWidth - this.width;}}var avoidAboutBlank = window.opera ||( document.layers && !navigator.mimeTypes['*'])
|| navigator.vendor == 'KDE' ||( document.childNodes && !document.all && !navigator.taintEnabled);t
his.popupW
indow = window.open(avoidAboutBlan
k?"":"abou
t:blank","
window_"+a
nchorname,
this.windo
wPropertie
s+",width=
"+this.wid
th+",heigh
t="+this.h
eight+",sc
reenX="+th
is.x+",lef
t="+this.x
+",screenY
="+this.y+
",top="+th
is.y+"");}
this.refre
sh();}}
function PopupWindow_hidePopup(){if
(this.divN
ame != null){if(this.use_gebi){do
cument.get
ElementByI
d(this.div
Name).styl
e.visibili
ty = "hidden";}else if(this.use_css){document.
all[this.d
ivName].st
yle.visibi
lity = "hidden";}else if(this.use_layers){docume
nt.layers[
this.divNa
me].visibi
lity = "hidden";}}else{if(this.po
pupWindow && !this.popupWindow.closed){
this.popup
Window.clo
se();this.
popupWindo
w = null;}}}
function PopupWindow_isClicked(e){i
f(this.div
Name != null){if(this.use_layers){
var clickX = e.pageX;var clickY = e.pageY;var t = document.layers[this.divNa
me];if((cl
ickX > t.left) &&(clickX < t.left+t.clip.width) &&(clickY > t.top) &&(clickY < t.top+t.clip.height)){retu
rn true;}else{return false;}}else if(document.all){var t = window.event.srcElement;wh
ile(t.pare
ntElement != null){if(t.id==this.divNam
e){return true;}t = t.parentElement;}return false;}else if(this.use_gebi && e){var t = e.originalTarget;while(t.p
arentNode != null){if(t.id==this.divNam
e){return true;}t = t.parentNode;}return false;}return false;}return false;}
function PopupWindow_hideIfNotClick
ed(e){if(t
his.autoHi
deEnabled && !this.isClicked(e)){this.h
idePopup()
;}}
function PopupWindow_autoHide(){thi
s.autoHide
Enabled = true;}
function PopupWindow_hidePopupWindo
ws(e){for(
var i=0;i<popupWindowObjects.l
ength;i++)
{if(popupW
indowObjec
ts[i] != null){var p = popupWindowObjects[i];p.hi
deIfNotCli
cked(e);}}
}
function PopupWindow_attachListener
(){if(docu
ment.layer
s){documen
t.captureE
vents(Even
t.MOUSEUP)
;}window.p
opupWindow
OldEventLi
stener = document.onmouseup;if(wind
ow.popupWi
ndowOldEve
ntListener
!= null){document.onmouseup = new Function("window.popupWind
owOldEvent
Listener()
;PopupWind
ow_hidePop
upWindows(
);");}else
{document.
onmouseup = PopupWindow_hidePopupWindo
ws;}}
function PopupWindow(){if(!window.p
opupWindow
Index){win
dow.popupW
indowIndex
= 0;}if(!window.popupWindowO
bjects){wi
ndow.popup
WindowObje
cts = new Array();}if(!window.listen
erAttached
){window.l
istenerAtt
ached = true;PopupWindow_attachLis
tener();}t
his.index = popupWindowIndex++;popupWi
ndowObject
s[this.ind
ex] = this;this.divName = null;this.popupWindow = null;this.width=0;this.hei
ght=0;this
.populated
= false;this.visible = false;this.autoHideEnabled
= false;this.contents = "";this.url="";this.window
Properties
="toolbar=
no,locatio
n=no,statu
s=no,menub
ar=no,scro
llbars=aut
o,resizabl
e,alwaysRa
ised,depen
dent,title
bar=no";if
(arguments
.length>0)
{this.type
="DIV";thi
s.divName = arguments[0];}else{this.ty
pe="WINDOW
";}this.us
e_gebi = false;this.use_css = false;this.use_layers = false;if(document.getEleme
ntById){th
is.use_geb
i = true;}else if(document.all){this.use_
css = true;}else if(document.layers){this.u
se_layers = true;}else{this.type = "WINDOW";}this.offsetX = 0;this.offsetY = 0;this.getXYPosition = PopupWindow_getXYPosition;
this.popul
ate = PopupWindow_populate;this.
setUrl = PopupWindow_setUrl;this.se
tWindowPro
perties = PopupWindow_setWindowPrope
rties;this
.refresh = PopupWindow_refresh;this.s
howPopup = PopupWindow_showPopup;this
.hidePopup
= PopupWindow_hidePopup;this
.setSize = PopupWindow_setSize;this.i
sClicked = PopupWindow_isClicked;this
.autoHide = PopupWindow_autoHide;this.
hideIfNotC
licked = PopupWindow_hideIfNotClick
ed;}
/* SOURCE FILE: CalendarPopup.js */
function CalendarPopup(){var c;if(arguments.length>0){c
= new PopupWindow(arguments[0]);
}else{c = new PopupWindow();c.setSize(15
0,175);}c.
offsetX = -152;c.offsetY = 25;c.autoHide();c.monthNam
es = new Array("January","February"
,"March","
April","Ma
y","June",
"July","Au
gust","Sep
tember","O
ctober","N
ovember","
December")
;c.monthAb
breviation
s = new Array("Jan","Feb","Mar","A
pr","May",
"Jun","Jul
","Aug","S
ep","Oct",
"Nov","Dec
");c.dayHe
aders = new Array("S","M","T","W","T",
"F","S");c
.returnFun
ction = "CP_tmpReturnFunction";c.r
eturnMonth
Function = "CP_tmpReturnMonthFunction
";c.return
QuarterFun
ction = "CP_tmpReturnQuarterFuncti
on";c.retu
rnYearFunc
tion = "CP_tmpReturnYearFunction"
;c.weekSta
rtDay = 0;c.isShowYearNavigation = false;c.displayType = "date";c.disabledWeekDays = new Object();c.disabledDatesEx
pression = "";c.yearSelectStartOffset
= 2;c.currentDate = null;c.todayText="Today";c
.cssPrefix
="";c.isSh
owNavigati
onDropdown
s=false;c.
isShowYear
Navigation
Input=fals
e;window.C
P_calendar
Object = null;window.CP_targetInput
= null;window.CP_dateFormat = "MM/dd/yyyy";c.copyMonthNa
mesToWindo
w = CP_copyMonthNamesToWindow;
c.setRetur
nFunction = CP_setReturnFunction;c.set
ReturnMont
hFunction = CP_setReturnMonthFunction;
c.setRetur
nQuarterFu
nction = CP_setReturnQuarterFunctio
n;c.setRet
urnYearFun
ction = CP_setReturnYearFunction;c
.setMonthN
ames = CP_setMonthNames;c.setMont
hAbbreviat
ions = CP_setMonthAbbreviations;c
.setDayHea
ders = CP_setDayHeaders;c.setWeek
StartDay = CP_setWeekStartDay;c.setDi
splayType = CP_setDisplayType;c.setDis
abledWeekD
ays = CP_setDisabledWeekDays;c.a
ddDisabled
Dates = CP_addDisabledDates;c.setY
earSelectS
tartOffset
= CP_setYearSelectStartOffse
t;c.setTod
ayText = CP_setTodayText;c.showYear
Navigation
= CP_showYearNavigation;c.sh
owCalendar
= CP_showCalendar;c.hideCale
ndar = CP_hideCalendar;c.getStyle
s = getCalendarStyles;c.refres
hCalendar = CP_refreshCalendar;c.getCa
lendar = CP_getCalendar;c.select = CP_select;c.setCssPrefix = CP_setCssPrefix;c.showNavi
gationDrop
downs = CP_showNavigationDropdowns
;c.showYea
rNavigatio
nInput = CP_showYearNavigationInput
;c.copyMon
thNamesToW
indow();re
turn c;}
function CP_copyMonthNamesToWindow(
){if(typeo
f(window.M
ONTH_NAMES
)!="undefi
ned" && window.MONTH_NAMES!=null){
window.MON
TH_NAMES = new Array();for(var i=0;i<this.monthNames.leng
th;i++){wi
ndow.MONTH
_NAMES[win
dow.MONTH_
NAMES.leng
th] = this.monthNames[i];}for(va
r i=0;i<this.monthAbbreviati
ons.length
;i++){wind
ow.MONTH_N
AMES[windo
w.MONTH_NA
MES.length
] = this.monthAbbreviations[i]
;}}}
function CP_tmpReturnFunction(y,m,d
){if(windo
w.CP_targe
tInput!=nu
ll){var dt = new Date(y,m-1,d,0,0,0);if(win
dow.CP_cal
endarObjec
t!=null){w
indow.CP_c
alendarObj
ect.copyMo
nthNamesTo
Window();}
window.CP_
targetInpu
t.value = formatDate(dt,window.CP_da
teFormat);
}else{aler
t('Use setReturnFunction() to define which function will get the clicked results!');}}
function CP_tmpReturnMonthFunction(
y,m){alert
('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
function CP_tmpReturnQuarterFunctio
n(y,q){ale
rt('Use setReturnQuarterFunction()
to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
function CP_tmpReturnYearFunction(y
){alert('U
se setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
function CP_setReturnFunction(name)
{this.retu
rnFunction
= name;}
function CP_setReturnMonthFunction(
name){this
.returnMon
thFunction
= name;}
function CP_setReturnQuarterFunctio
n(name){th
is.returnQ
uarterFunc
tion = name;}
function CP_setReturnYearFunction(n
ame){this.
returnYear
Function = name;}
function CP_setMonthNames(){for(var
i=0;i<arguments.length;i++
){this.mon
thNames[i]
= arguments[i];}this.copyMon
thNamesToW
indow();}
function CP_setMonthAbbreviations()
{for(var i=0;i<arguments.length;i++
){this.mon
thAbbrevia
tions[i] = arguments[i];}this.copyMon
thNamesToW
indow();}
function CP_setDayHeaders(){for(var
i=0;i<arguments.length;i++
){this.day
Headers[i]
= arguments[i];}}
function CP_setWeekStartDay(day){th
is.weekSta
rtDay = day;}
function CP_showYearNavigation(){th
is.isShowY
earNavigat
ion =(arguments.length>0)?argu
ments[0]:t
rue;}
function CP_setDisplayType(type){if
(type!="da
te"&&type!
="week-end
"&&type!="
month"&&ty
pe!="quart
er"&&type!
="year"){a
lert("Inva
lid display type! Must be one of: date,week-end,month,quarte
r,year");r
eturn false;}this.displayType=ty
pe;}
function CP_setYearSelectStartOffse
t(num){thi
s.yearSele
ctStartOff
set=num;}
function CP_setDisabledWeekDays(){t
his.disabl
edWeekDays
= new Object();for(var i=0;i<arguments.length;i++
){this.dis
abledWeekD
ays[argume
nts[i]] = true;}}
function CP_addDisabledDates(start,
end){if(arguments.length==
1){end=sta
rt;}if(sta
rt==null && end==null){return;}if(this
.disabledD
atesExpres
sion!=""){
this.disab
ledDatesEx
pression+=
"||";}if(start!=null){star
t = parseDate(start);start=""+
start.getF
ullYear()+
LZ(start.g
etMonth()+
1)+LZ(star
t.getDate(
));}if(end
!=null){en
d=parseDat
e(end);end
=""+end.ge
tFullYear(
)+LZ(end.g
etMonth()+
1)+LZ(end.
getDate())
;}if(start
==null){th
is.disable
dDatesExpr
ession+="(
ds<="+end+
")";}else if(end ==null){this.disabledDates
Expression
+="(ds>="+
start+")";
}else{this
.disabledD
atesExpres
sion+="(ds
>="+start+
"&&ds<="+e
nd+")";}}
function CP_setTodayText(text){this
.todayText
= text;}
function CP_setCssPrefix(val){this.
cssPrefix = val;}
function CP_showNavigationDropdowns
(){this.is
ShowNaviga
tionDropdo
wns =(arguments.length>0)?argu
ments[0]:t
rue;}
function CP_showYearNavigationInput
(){this.is
ShowYearNa
vigationIn
put =(arguments.length>0)?argu
ments[0]:t
rue;}
function CP_hideCalendar(){if(argum
ents.lengt
h > 0){window.popupWindowObjec
ts[argumen
ts[0]].hid
ePopup();}
else{this.
hidePopup(
);}}
function CP_refreshCalendar(index){
var calObject = window.popupWindowObjects[
index];if(
arguments.
length>1){
calObject.
populate(c
alObject.g
etCalendar
(arguments
[1],argume
nts[2],arg
uments[3],
arguments[
4],argumen
ts[5]));}e
lse{calObj
ect.popula
te(calObje
ct.getCale
ndar());}c
alObject.r
efresh();}
function CP_showCalendar(anchorname
){if(argum
ents.lengt
h>1){if(ar
guments[1]
==null||ar
guments[1]
==""){this
.currentDa
te=new Date();}else{this.currentD
ate=new Date(parseDate(arguments[1
]));}}this
.populate(
this.getCa
lendar());
this.showP
opup(ancho
rname);}
function CP_select(inputobj, linkname, format){var selectedDate=(arguments.le
ngth>3)?ar
guments[3]
:null;if(!
window.get
DateFromFo
rmat){aler
t("calenda
r.select: To use this method you must also include 'date.js' for date formatting");return;}if(th
is.display
Type!="dat
e"&&this.d
isplayType
!="week-en
d"){alert(
"calendar.
select: This function can only be used with displayType 'date' or 'week-end'");return;}if(in
putobj.typ
e!="text" && inputobj.type!="hidden" && inputobj.type!="textarea")
{alert("ca
lendar.sel
ect: Input object passed is not a valid form input object");window.CP_targetI
nput=null;
return;}if
(inputobj.
disabled){
return;}wi
ndow.CP_ta
rgetInput = inputobj;window.CP_calenda
rObject = this;this.currentDate=null
;var time=0;if(selectedDate!=nu
ll){time = getDateFromFormat(selected
Date,forma
t)}else if(inputobj.value!=""){tim
e = getDateFromFormat(inputobj
.value,for
mat);}if(s
electedDat
e!=null || inputobj.value!=""){if(tim
e==0){this
.currentDa
te=null;}e
lse{this.c
urrentDate
=new Date(time);}}window.CP_dat
eFormat = format;this.showCalendar(l
inkname);}
function getCalendarStyles(){var result = "";var p = "";if(this!=null && typeof(this.cssPrefix)!="u
ndefined" && this.cssPrefix!=null && this.cssPrefix!=""){p=this
.cssPrefix
;}result += "<STYLE>\n";result += "."+p+"cpYearNavigation,."
+p+"cpMont
hNavigatio
n{backgrou
nd-color:#
C0C0C0;tex
t-align:ce
nter;verti
cal-align:
center;tex
t-decorati
on:none;co
lor:#00000
0;font-wei
ght:bold;}
\n";result
+= "."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+
p+"cpMonth
Navigation
,."+p+"cpC
urrentMont
hDate,."+p
+"cpCurren
tMonthDate
Disabled,.
"+p+"cpOth
erMonthDat
e,."+p+"cp
OtherMonth
DateDisabl
ed,."+p+"c
pCurrentDa
te,."+p+"c
pCurrentDa
teDisabled
,."+p+"cpT
odayText,.
"+p+"cpTod
ayTextDisa
bled,."+p+
"cpText{fo
nt-family:
arial;font
-size:8pt;
}\n";resul
t += "TD."+p+"cpDayColumnHeader
{text-alig
n:right;bo
rder:solid
thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";result += "."+p+"cpCurrentMonthDate,
."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate{text-a
lign:right
;text-deco
ration:non
e;}\n";res
ult += "."+p+"cpCurrentMonthDateD
isabled, ."+p+"cpOtherMonthDateDisa
bled, ."+p+"cpCurrentDateDisable
d{color:#D
0D0D0;text
-align:rig
ht;text-de
coration:l
ine-throug
h;}\n";res
ult += "."+p+"cpCurrentMonthDate,
.cpCurrentDate{color:#0000
00;}\n";re
sult += "."+p+"cpOtherMonthDate{co
lor:#80808
0;}\n";res
ult += "TD."+p+"cpCurrentDate{col
or:white;b
ackground-
color: #C0C0C0;border-width:1px;b
order:soli
d thin #800000;}\n";result += "TD."+p+"cpCurrentDateDisa
bled{borde
r-width:1p
x;border:s
olid thin #FFAAAA;}\n";result += "TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisable
d{border:s
olid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";result += "A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisab
led{height
:20px;}\n"
;result += "A."+p+"cpTodayText{color:
black;}\n"
;result += "."+p+"cpTodayTextDisabled
{color:#D0
D0D0;}\n";
result += "."+p+"cpBorder{border:sol
id thin #808080;}\n";result += "</STYLE>\n";return result;}
function CP_getCalendar(){var now = new Date();if(this.type == "WINDOW"){var windowref = "window.opener.";}else{var
windowref = "";}var result = "";if(this.type == "WINDOW"){result += "<HTML><HEAD><TITLE>Calend
ar</TITLE>
"+this.get
Styles()+"
</HEAD><BO
DY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';}else{re
sult += '<TABLE CLASS="'+this.cssPrefix+'c
pBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result += '<TR><TD ALIGN=CENTER>\n';result += '<CENTER>\n';}if(this.disp
layType=="
date" || this.displayType=="week-en
d"){if(thi
s.currentD
ate==null)
{this.curr
entDate = now;}if(arguments.length > 0){var month = arguments[0];}else{var month = this.currentDate.getMonth(
)+1;}if(ar
guments.le
ngth > 1 && arguments[1]>0 && arguments[1]-0==arguments[
1]){var year = arguments[1];}else{var year = this.currentDate.getFullYe
ar();}var daysinmonth= new Array(0,31,28,31,30,31,30,
31,31,30,3
1,30,31);i
f( ((year%4 == 0)&&(year%100 != 0) ) ||(year%400 == 0) ){daysinmonth[2] = 29;}var current_month = new Date(year,month-1,1);var display_year = year;var display_month = month;var display_date = 1;var weekday= current_month.getDay();var
offset = 0;offset =(weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekda
y ;if(offset > 0){display_month--;if(disp
lay_month < 1){display_month = 12;display_year--;}display
_date = daysinmonth[display_month]
-offset+1;
}var next_month = month+1;var next_month_year = year;if(next_month > 12){next_month=1;next_mont
h_year++;}
var last_month = month-1;var last_month_year = year;if(last_month < 1){last_month=12;last_mont
h_year--;}
var date_class;if(this.type!="
WINDOW"){r
esult += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";}result += '<TR>\n';var refresh = windowref+'CP_refreshCalen
dar';var refreshLink = 'javascript:' + refresh;if(this.isShowNavi
gationDrop
downs){res
ult += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" name="cpMonth" onChange="'+refresh+'('+th
is.index+'
,this.opti
ons[this.s
electedInd
ex].value-
0,'+(year-
0)+');">';
for( var monthCounter=1;monthCounte
r<=12;mont
hCounter++
){var selected =(monthCounter==month) ? 'SELECTED' : '';result += '<option value="'+monthCounter+'" '+selected+'>'+this.monthN
ames[month
Counter-1]
+'</option
>';}result
+= '</select></TD>';result += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="10"> </TD>';re
sult += '<TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'c
pYearNavig
ation" name="cpYear" onChange="'+refresh+'('+th
is.index+'
,'+month+'
,this.opti
ons[this.s
electedInd
ex].value-
0);">';for
( var yearCounter=year-this.year
SelectStar
tOffset;ye
arCounter<
=year+this
.yearSelec
tStartOffs
et;yearCou
nter++){va
r selected =(yearCounter==year) ? 'SELECTED' : '';result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter
+'</option
>';}result
+= '</select></TD>';}else{if(
this.isSho
wYearNavig
ation){res
ult += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="10"><A CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" HREF="'+refreshLink+'('+th
is.index+'
,'+last_mo
nth+','+la
st_month_y
ear+');">&
lt;</A></T
D>';result
+= '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'c
pMonthNavi
gation">'+
this.month
Names[mont
h-1]+'</SP
AN></TD>';
result += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="10"><A CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" HREF="'+refreshLink+'('+th
is.index+'
,'+next_mo
nth+','+ne
xt_month_y
ear+');">&
gt;</A></T
D>';result
+= '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="10"> </TD>';re
sult += '<TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="10"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="'+refreshLink+'('+th
is.index+'
,'+month+'
,'+(year-1
)+');"><
;</A></TD>
';if(this.
isShowYear
Navigation
Input){res
ult += '<TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'c
pYearNavig
ation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this
.index+','
+month+',t
his.value-
0);"></TD>
';}else{re
sult += '<TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'c
pYearNavig
ation">'+y
ear+'</SPA
N></TD>';}
result += '<TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="10"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="'+refreshLink+'('+th
is.index+'
,'+month+'
,'+(year+1
)+');">>
;</A></TD>
';}else{re
sult += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="22"><A CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" HREF="'+refreshLink+'('+th
is.index+'
,'+last_mo
nth+','+la
st_month_y
ear+');">&
lt;<</A
></TD>\n';
result += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'c
pMonthNavi
gation">'+
this.month
Names[mont
h-1]+' '+year+'</SPAN></TD>\n';re
sult += '<TD CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" WIDTH="22"><A CLASS="'+this.cssPrefix+'c
pMonthNavi
gation" HREF="'+refreshLink+'('+th
is.index+'
,'+next_mo
nth+','+ne
xt_month_y
ear+');">&
gt;></A
></TD>\n';
}}result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';result += '<TR>\n';for(var j=0;j<7;j++){result += '<TD CLASS="'+this.cssPrefix+'c
pDayColumn
Header" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'c
pDayColumn
Header">'+
this.dayHe
aders[(thi
s.weekStar
tDay+j)%7]
+'</TD>\n'
;}result += '</TR>\n';for(var row=1;row<=6;row++){result
+= '<TR>\n';for(var col=1;col<=7;col++){var disabled=false;if(this.dis
abledDates
Expression
!=""){var ds=""+display_year+LZ(disp
lay_month)
+LZ(displa
y_date);ev
al("disabl
ed=("+this
.disabledD
atesExpres
sion+")");
}var dateClass = "";if((display_month == this.currentDate.getMonth(
)+1) &&(display_date==this.curr
entDate.ge
tDate()) &&(display_year==this.curr
entDate.ge
tFullYear(
))){dateCl
ass = "cpCurrentDate";}else if(display_month == month){dateClass = "cpCurrentMonthDate";}else
{dateClass
= "cpOtherMonthDate";}if(dis
abled || this.disabledWeekDays[col-
1]){result
+= ' <TD CLASS="'+this.cssPrefix+da
teClass+'"
><SPAN CLASS="'+this.cssPrefix+da
teClass+'D
isabled">'
+display_d
ate+'</SPA
N></TD>\n'
;}else{var
selected_date = display_date;var selected_month = display_month;var selected_year = display_year;if(this.displ
ayType=="w
eek-end"){
var d = new Date(selected_year,selecte
d_month-1,
selected_d
ate,0,0,0,
0);d.setDa
te(d.getDa
te() +(7-col));selected_year = d.getYear();if(selected_ye
ar < 1000){selected_year += 1900;}selected_month = d.getMonth()+1;selected_da
te = d.getDate();}result += ' <TD CLASS="'+this.cssPrefix+da
teClass+'"
><A HREF="javascript:'+windowr
ef+this.re
turnFuncti
on+'('+sel
ected_year
+','+selec
ted_month+
','+select
ed_date+')
;'+windowr
ef+'CP_hid
eCalendar(
\''+this.i
ndex+'\');
" CLASS="'+this.cssPrefix+da
teClass+'"
>'+display
_date+'</A
></TD>\n';
}display_d
ate++;if(d
isplay_dat
e > daysinmonth[display_month]
){display_
date=1;dis
play_month
++;}if(dis
play_month
> 12){display_month=1;displa
y_year++;}
}result += '</TR>';}var current_weekday = now.getDay() - this.weekStartDay;if(curre
nt_weekday
< 0){current_weekday += 7;}result += '<TR>\n';result += ' <TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'c
pTodayText
">\n';if(t
his.disabl
edDatesExp
ression!="
"){var ds=""+now.getFullYear()+LZ
(now.getMo
nth()+1)+L
Z(now.getD
ate());eva
l("disable
d=("+this.
disabledDa
tesExpress
ion+")");}
if(disable
d || this.disabledWeekDays[curr
ent_weekda
y+1]){resu
lt += ' <SPAN CLASS="'+this.cssPrefix+'c
pTodayText
Disabled">
'+this.tod
ayText+'</
SPAN>\n';}
else{resul
t += ' <A CLASS="'+this.cssPrefix+'c
pTodayText
" HREF="javascript:'+windowr
ef+this.re
turnFuncti
on+'(\''+n
ow.getFull
Year()+'\'
,\''+(now.
getMonth()
+1)+'\',\'
'+now.getD
ate()+'\')
;'+windowr
ef+'CP_hid
eCalendar(
\''+this.i
ndex+'\');
">'+this.t
odayText+'
</A>\n';}r
esult += ' <BR>\n';result += ' </TD></TR></TABLE></CENTER
></TD></TR
></TABLE>\
n';}if(thi
s.displayT
ype=="mont
h" || this.displayType=="quarter
" || this.displayType=="year"){
if(argumen
ts.length > 0){var year = arguments[0];}else{if(this
.displayTy
pe=="year"
){var year = now.getFullYear()-this.yea
rSelectSta
rtOffset;}
else{var year = now.getFullYear();}}if(thi
s.displayT
ype!="year
" && this.isShowYearNavigation)
{result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += ' <TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="22"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="javascript:'+windowr
ef+'CP_ref
reshCalend
ar('+this.
index+','+
(year-1)+'
);"><&l
t;</A></TD
>\n';resul
t += ' <TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="100">'+year+'</TD>\
n';result += ' <TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="22"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="javascript:'+windowr
ef+'CP_ref
reshCalend
ar('+this.
index+','+
(year+1)+'
);">>&g
t;</A></TD
>\n';resul
t += '</TR></TABLE>\n';}}if(thi
s.displayT
ype=="mont
h"){result
+= '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<4;i++){result += '<TR>';for(var j=0;j<3;j++){var monthindex =((i*3)+j);result += '<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'c
pText" HREF="javascript:'+windowr
ef+this.re
turnMonthF
unction+'(
'+year+','
+(monthind
ex+1)+');'
+windowref
+'CP_hideC
alendar(\'
'+this.ind
ex+'\');" CLASS="'+date_class+'">'+t
his.monthA
bbreviatio
ns[monthin
dex]+'</A>
</TD>';}re
sult += '</TR>';}result += '</TABLE></CENTER></TD></T
R></TABLE>
\n';}if(th
is.display
Type=="qua
rter"){res
ult += '<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<2;i++){result += '<TR>';for(var j=0;j<2;j++){var quarter =((i*2)+j+1);result += '<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'c
pText" HREF="javascript:'+windowr
ef+this.re
turnQuarte
rFunction+
'('+year+'
,'+quarter
+');'+wind
owref+'CP_
hideCalend
ar(\''+thi
s.index+'\
');" CLASS="'+date_class+'">Q'+
quarter+'<
/A><BR><BR
></TD>';}r
esult += '</TR>';}result += '</TABLE></CENTER></TD></T
R></TABLE>
\n';}if(th
is.display
Type=="yea
r"){var yearColumnSize = 4;result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += ' <TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="javascript:'+windowr
ef+'CP_ref
reshCalend
ar('+this.
index+','+
(year-(yea
rColumnSiz
e*2))+');"
><<<
/A></TD>\n
';result += ' <TD CLASS="'+this.cssPrefix+'c
pYearNavig
ation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'c
pYearNavig
ation" HREF="javascript:'+windowr
ef+'CP_ref
reshCalend
ar('+this.
index+','+
(year+(yea
rColumnSiz
e*2))+');"
>>><
/A></TD>\n
';result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<yearColumnSize;i++){
for(var j=0;j<2;j++){var currentyear = year+(j*yearColumnSize)+i;
result += '<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'c
pText" HREF="javascript:'+windowr
ef+this.re
turnYearFu
nction+'('
+currentye
ar+');'+wi
ndowref+'C
P_hideCale
ndar(\''+t
his.index+
'\');" CLASS="'+date_class+'">'+c
urrentyear
+'</A></TD
>';}result
+= '</TR>';}result += '</TABLE></CENTER></TD></T
R></TABLE>
\n';}if(th
is.type == "WINDOW"){result += "</BODY></HTML>\n";}return
result;}
document.write(getCalendar
Styles());
var cal = new CalendarPopup("testdiv1");
//cal.addDisabledDates(for
matDate(ne
w Date(),"yyyy-MM-dd")-2,nul
l);
date = new Date();
date = new Date(date.getFullYear(),da
te.getMont
h(),date.g
etDate()+1
);
cal.addDisabledDates(forma
tDate(date
,"yyyy-MM-
dd"),null)
;
thanks
J