Welcome Guest Search | Active Topics | Sign In | Register

Editable Calendar - Calendar1_DayRender doesn't run if click on a custom-made "Today" butt Options
Danny Chok
Posted: Thursday, August 16, 2007 9:27:12 PM
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
eo_support
Posted: Friday, August 17, 2007 7:22:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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
Danny Chok
Posted: Sunday, August 19, 2007 6:24:11 PM
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
eo_support
Posted: Sunday, August 19, 2007 6:37:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Thanks for the update! We will add it to the documentation.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.