[ 2 posts ]

Jeff Arnold

  • Username: JArnold
  • Joined: Mon Nov 16, 2009 4:18 am
  • Posts: 26
  • Offline
  • Profile

Calendar Group how to force a redraw

Post Posted: Thu Dec 29, 2011 5:59 am
+0-
Hi,
I have create a calendar group with the normal defaults:
=========
YAHOO.example.calendar.init = function() {
YAHOO.example.calendar.cal1 = new YAHOO.widget.CalendarGroup("cal1","cal1Container",
{ pagedate:"3/2006" } );


cal=YAHOO.example.calendar.cal1;

=============

I want to highlight certain cells, easy using

cal.addRenderer("4/4/2006", cal.renderCellStyleHighlight1);

Now for the problem I cant hard code them, I use an asyncRequest to obtain a list of dates
Then in the onSuccess loop through the list and call:

cal.addRenderer(rtnDate, cal.renderCellStyleHighlight1);


This works fiine for any month not being displayed and when I navigate to it, all the dates are as they should be, now for the problem the cal group opens with 2 months showing. If I add any high lights to them, they do not display. I'm guessing this is because the cal rendered itself before the asyc finished. If I navigate away from the initial months and come back they are fine and show the highlights.

So I need a way to tell the calendar, your data has changed redraw.
I've tried calling cal.render() but that either does nothing or resets everything.

Any ideas ?


Many Thanks
Jeff.

Jeff Arnold

  • Username: JArnold
  • Joined: Mon Nov 16, 2009 4:18 am
  • Posts: 26
  • Offline
  • Profile

Re: Calendar Group how to force a redraw

Post Posted: Sat Dec 31, 2011 7:09 am
+0-
View my other topic on Calendar and Async Data, it may help
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum