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