Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Calendar and changing the renderCellDefault   Message List  
Reply | Forward Message #31106 of 52123 |
Hi there,

i have some trouble with the calendar and changing the default
behavior of the day click event. here is my code.

window.onload = function() {
var loader = new YAHOO.util.YUILoader({
require: ["calendar"],
loadOptional: true,
allowRollup: true,
base: 'jslibs/yui251/build/',

onProgress: function(o){
//document.getElementById('indicator').style.display = 'block';
},

// The function to call when all script/css resources have been
loaded
onSuccess: function(){
var cal1 = new YAHOO.widget.Calendar("cal1Container");
var renderCellDefault = function(workingDate, cell) {
var Jahr = workingDate.getYear();
var month = workingDate.getMonth() + 1;
if (Jahr < 2000)
Jahr = Jahr + 1900;
YAHOO.util.Dom.addClass(cell, "highlight1");
cell.innerHTML = '<a href="/de/blog/'+Jahr+'/'+ month
+'/'+this.buildDayLabel(workingDate)+'" class="' +
this.Style.CSS_CELL_SELECTOR + '">' + this.buildDayLabel(workingDate)
+ "</a>";
return YAHOO.widget.Calendar.STOP_RENDER; // to force the
new behavior
}
cal1.addRenderer("5/15/2008",renderCellDefault)
cal1.render();

} // on success
});
loader.insert();
};

the problem is now if i click in the highlighted day nothing happens
cause the click event must be stopped. How can activate the normal
link behavior so that if i click on the day the page reloads. Would be
nice if anybody could help me.

regards thomas




Sat May 17, 2008 2:59 am

teejay_hh
Offline Offline
Send Email Send Email

Forward
Message #31106 of 52123 |
Expand Messages Author Sort by Date

Hi there, i have some trouble with the calendar and changing the default behavior of the day click event. here is my code. window.onload = function() { var...
teejay_hh
Offline Send Email
May 17, 2008
2:59 am

... 'block'; ... hmmmm no one any idea ? too bad :(...
teejay_hh
Offline Send Email
May 18, 2008
6:17 am

Try removing the "this.Style.CSS_CELL_SELECTOR" class which you're applying to your custom anchor. This marker class is used to identify the regular "date...
Satyen Desai
sdezzi
Offline Send Email
May 19, 2008
4:57 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help