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

RadDatePicker: Lost value after postback

1 Answer 269 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Eduardo
Top achievements
Rank 1
Eduardo asked on 20 Dec 2013, 08:38 PM

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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Dec 2013, 03:37 AM
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.
Tags
Ajax
Asked by
Eduardo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or