search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

InnerHTML render bug in Calendar cells

Asked by Matteo
11 years ago.

Hi everybody,
I would like to know if there's a quick workaround to fix a bug (at least I suppose that is a bug) in cells render.

I'm using the Calendar component, and I'm trying to inject some html code inside cells using the BeforeCellRender event in code behind, like this:

e.InnerHTML = "gray";

Everything works fine until I try to make any kind of callback (Eg trying to switch to another week using the navigator), which makes the js code crash and Firebug reporting an error:

TypeError: $1Y is undefined

I'm rendering the calendar in cssonly mode, and my purpose is to render some cells with a different css class. Since that is not possible simply, my idea is to inject a div inside every cell with the correct color assigned.

e.InnerHTML = "<div class='calendar_mysb_cell_available'></div>";

On the early attemps I was guessing the problem was the quotes which were not correctly escaped in javascript. Then I tryed with a simple word (eg 'gray') but the bug was still there.

Thank you all in advance.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.