This is a migrated thread and some comments may be shown as answers.

RadDatePicker with calendar autopost back does not work correctly

1 Answer 31 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 13 May 2014, 05:39 PM
Hi I am using code as shown below: When I click on Popup to open calendar it opens it, but immediately it does a postback. Dont know why this post back happens.
in OnDayRender event I am changing the holiday pattern background colors.

<asp:UpdatePanel ID="updCal1" runat="server">
                                        <ContentTemplate>
                                        <panel>
                                         <telerik:RadDatePicker ID="radcal1" runat="server" AutoPostBack="true">
                                            <ClientEvents OnPopupOpening="OnPopupOpening" />
                                            <Calendar OnDayRender="cal_DayRender" runat="server" AutoPostBack="true"></Calendar>
                                        </telerik:RadDatePicker>
                                        </panel>
                                        </ContentTemplate>                                       
                                        </asp:UpdatePanel>

<script type="text/javascript">
    function OnPopupOpening(sender, args) {
            sender.get_calendar().raise_dayRender();
        }
</script> 



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 14 May 2014, 03:58 AM
Hi Rajesh,

Please remove the AutoPostBack="true" from the Calendar embedded control which works fine at my end.

ASPX:
...
<telerik:RadDatePicker ID="radcal1" runat="server" AutoPostBack="true">
   <ClientEvents OnPopupOpening="OnPopupOpening" />
   <Calendar ID="Calendar1" runat="server" OnDayRender="cal_DayRender">
   </Calendar>
</telerik:RadDatePicker>
...

Thanks,
Princy.
Tags
Calendar
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or