RadDatePicker Set Date

3 posts, 1 answers
  1. Rusty
    Rusty avatar
    6 posts
    Member since:
    Dec 2012

    Posted 20 Jun 2013 Link to this post

    I have an asp.net page with 2 raddatepickers on it.  I would like for the user to be able to pick a date from picker_1 and picker_2 would get populated with that same date.  How can this be done??
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Jun 2013 Link to this post

    Hi,

    Please try the following code snippet.
    ASPX:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server" ClientEvents-OnDateSelected="OnDateSelected"></telerik:RadDatePicker>
    <telerik:RadDatePicker ID="RadDatePicker2" runat="server"></telerik:RadDatePicker>
    JS:
    function OnDateSelected(sender, args)
     {
        var RadDatePicker2 = $find("<%=RadDatePicker2.ClientID%>");
        RadDatePicker2.set_selectedDate(sender.get_selectedDate());
     }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rusty
    Rusty avatar
    6 posts
    Member since:
    Dec 2012

    Posted 21 Jun 2013 Link to this post

    Shinu,
    That worked perfect!!  You are a life saver.  Many thanks for your much needed help on this one.
Back to Top