Hi again,
I am doing an e-Leave app by extending the "Editable Calendar" sample code and now I am adding a "multiple dates selector" function to select a range of dates for leave application.
Now I have trouble on the following script, and I have captured screens downloadable at
http://www.sendspace.com/file/8ffw2dAfter user enters a "From Date" & "To Date" in the pop-up form (e-leave1.gif), it runs this javascript to loop through each day and trigger a CallBack (which triggers DayRender) for building the HTML in each day box. (e-leave2.gif, e-leave3.gif). However, without the alert() statement, the script always stops at the 12th day.. I have tried to add code to skip some days in between, and it also skips them and but still stops at the 12th one. (i.e. 1,2,3,4,5,6,9,10,11,12,13,14)
I don't know why if I add the alert statement (e-leave4.gif, e-leave5.gif, e-leave6.gif), it prompt alert for each day, but it can run till the end (=From Date 20/8).
var curDate = fromLeaveDate;
do {
user_input = eo_DateToString(curDate) + '^' + leave_type + '^BO^' + remarks;
eo_Callback('<%=CallbackPanel1.ClientID%>', user_input);
//alert(curDate + "||" + toLeaveDate);
curDate.setDate(curDate.getDate() + 1);
}
while (curDate <= toLeaveDate);