RadDatePicker: Lost value after postback

2 posts, 0 answers
  1. Eduardo
    Eduardo avatar
    1 posts
    Member since:
    Dec 2013

    Posted 20 Dec 2013 Link to this post

    Hi

    I need help, I have a DatePicker in my web form, I assign the value on the client side and after postback the value is lost.

    In try put RadDatePicker  inside the update panel and this not fix the problem.

    Regards

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

    Posted 20 Dec 2013 Link to this post

    Hi,

    Please have a look into the following sample code snippet which works fine at my end.

    ASPX:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
    </telerik:RadDatePicker>
    <telerik:RadButton ID="RadButton1" runat="server" Text="PostBack">
    </telerik:RadButton>

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var datepicker = $find("<%=RadDatePicker1.ClientID %>");
            datepicker._dateInput.set_value("20/12/13");
        }
    </script>

    Let me know if you have any concern.
    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top