Hi there,
I was using the RadDatePicker and customizing its Calender's innerHTML via the OnDayRender client side event. This seems to have changed with the latest Q1 release and no longer works. In the case of the
OnDayRender(claendarInstance,args)
the args.get_date()[0] doesn't work because the args object appears to be a PopUpButton object and not the Date Triplet like it was before. So what the deuce? Can I get to the Date Triplet from the PopUpButton Args?
Here's my Code, the script that breaks on line 1 and the HTML that breaks it. Thanks.
I was using the RadDatePicker and customizing its Calender's innerHTML via the OnDayRender client side event. This seems to have changed with the latest Q1 release and no longer works. In the case of the
OnDayRender(claendarInstance,args)
the args.get_date()[0] doesn't work because the args object appears to be a PopUpButton object and not the Date Triplet like it was before. So what the deuce? Can I get to the Date Triplet from the PopUpButton Args?
Here's my Code, the script that breaks on line 1 and the HTML that breaks it. Thanks.
function OnDayRender(calendarInstance, args) |
{ |
var jsDate = new Date(args.get_date()[0], args.get_date()[1] - 1, args.get_date()[2]); |
args.get_cell().innerHTML = "<table cellpadding='2' cellspacing='0' width='100%' height='100%' class='contentTable' ><tr><td></td><td class='dateCell'>" + jsDate.getDate() + "</td></tr><tr><td colspan='2' class='countCell'> 0</td></tr></table>"; |
for(i = 0; i < arrDiaries.length; i++) |
{ |
var javaDueDate = new Date(arrDiaries[i].DiaryDate); |
var simpleDate = (jsDate.getMonth() + 1) + "/" + jsDate.getDate() + "/" + jsDate.getYear(); |
var javaCurrentDate = new Date(simpleDate); |
if(javaDueDate.toDateString() == javaCurrentDate.toDateString()) |
{ |
args.get_cell().innerHTML = "<table cellpadding='2' cellspacing='0' width='100%' height='100%' class='contentTable' ><tr><td></td><td class='dateCell'>" + jsDate.getDate() + "</td></tr><tr><td colspan='2' class='countCell'>" + arrDiaries[i].DiaryCount + "</td></tr></table>"; |
} |
} |
} |
<telerik:RadDatePicker ID="sdpDueDate" runat="server" |
ClientEvents-OnDateSelected="OnDateSelected" |
Skin="Office2007" |
EnableTheming="false"> |
<Calendar ID="Calendar1" runat="server" |
OnDayRender="Calendar_OnDayRender" |
<ClientEvents OnDayRender="OnDayRender" /> |
</Calendar> |
</telerik:RadDatePicker> |