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

Selecteddateevent

1 Answer 56 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kshitiz
Top achievements
Rank 1
Kshitiz asked on 24 Apr 2012, 09:37 PM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Apr 2012, 06:48 AM
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.
Tags
Calendar
Asked by
Kshitiz
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or