|
Rank: Member Groups: Member
Joined: 8/16/2007 Posts: 10
|
here's the code behind today button
function goToday(){ eo_GetObject("Calendar1").goTo(new Date()); //eo_Callback('<%=CallbackPanel1.ClientID%>'); }
if I run 1st line only, calendar goes back to Aug 2007, but Calendar1_DayRender doesn't run (i.e. no HTML content generated in each day box)
if I run 2nd line too, calendar goes back to Aug 2007, but quickly switch back to the previous display month (e.g. Oct 2007), and the Calendar1_DayRender runs
How can I show current month Aug 2007 and the Calendar1_DayRender run at the same time?
thanks
Danny
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
You need eo_Callback in order to go back to the server side to trigger your DayRender event. So that has to be there.
goTo method has a time delay because of the glide effect that it plays. So if you call eo_Callback immediately after goTo, intenally the calendar still thinks its on the previous month because the switch from that month to the new month even though has started, but has not finished yet.
goTo has a second parameter, when set to true, it skips effects. So you can try:
eo_GetObject("Calendar1").goTo(new Date(), true); eo_Callback('<%=CallbackPanel1.ClientID%>');
And see if that works.
Thanks
|
|
Rank: Member Groups: Member
Joined: 8/16/2007 Posts: 10
|
Dear Support,
Thanks a lot, it works now!
Please add this useful param to documentation in future.
Danny
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Thanks for the update! We will add it to the documentation.
Thanks
|
|