Selecteddateevent

2 posts, 0 answers
  1. Kshitiz
    Kshitiz avatar
    21 posts
    Member since:
    Aug 2012

    Posted 24 Apr 2012 Link to this post

    am keeping selecteddate as current date ...
    so when user selects different date that date should be selected indatabase for 
    that am using SelectedDateChaged event

    how how to get that new date..
    am using

    in onselect...{

    radpicker.selecteddate == it shows the current date 
    }


    how to get the new date  i have kept auto= true also

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

    Posted 25 Apr 2012 Link to this post

    Hi,

    Here is the sample code that i tried based on your scenario.

    ASPX:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server" AutoPostBack="true" OnSelectedDateChanged="RadDatePicker_SelectedDateChanged">
    </telerik:RadDatePicker>

    C#:
    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RadDatePicker1.SelectedDate = DateTime.Now;
            }
        }
    protected void RadDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
            Response.Write(RadDatePicker1.SelectedDate);
        }

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top