RadDatePicker with calendar autopost back does not work correctly

2 posts, 0 answers
  1. Rajesh
    Rajesh avatar
    1 posts
    Member since:
    May 2014

    Posted 13 May 2014 Link to this post

    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> 



  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 May 2014 in reply to Rajesh Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top