Thanks
<telerik:RadDateTimePicker ID="formExten_AuthEndDate" runat="server" AutoPostBack ="true" >
</telerik:RadDateTimePicker>
Private Sub formExten_AuthEndDate_SelectedDateChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs) Handles formExten_AuthEndDate.SelectedDateChanged
''''''''''
End Sub
7 Answers, 1 is accepted
SelectedDateChanged server event fires when the user changes the value of the control, either when input area loses focus after the user has typed a new value, or when the user selects a new value in the popup calendar or time view control. Here is the sample code that I tried which worked as expected.
VB:
Private
Sub
formExten_AuthEndDate_SelectedDateChanged(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs)
Handles
formExten_AuthEndDate.SelectedDateChanged
Response.Write(e.NewDate.Value.ToString())
End
Sub
Thanks,
Princy.
Thanks. I think my function is same as yours . maybe ajax caused a problem. SelectedDateChanged server event fires only input area loses focus after the user has typed a new value, event not fires when the user selects a new value in the popup calendar or time view control
I am afraid we are not able to replicate the issue locally. Could you reproduce this behavior with any of our demos?
http://demos.telerik.com/aspnet-ajax/calendar/examples/datetimepicker/autopostbackcontrol/defaultcs.aspx
Please provide us the exact steps to reproduce the issue or open a support ticket to send us a sample runnable application demonstrating the erratic behavior. Thus, we will be able to further analyze the problem and provide a proper solution.
Regards,
Eyup
the Telerik team
Eyup,
when I used code below . SelectedDateChanged server event fires both case, when I use code posted before , it won't work. do you know why. Thanks
Jim
<telerik:RadDateTimePicker ID="formExten_AuthEndDate" runat="server" AutoPostBackControl="Calendar" OnSelectedDateChanged="formExten_AuthEndDate_SelectedDateChanged"
TimeView CellSpacing="-1"></TimeView>
<
TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>
<
Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>
<
DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"></DateInput>
<
DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDateTimePicker>
old code I used before,
<td style="text-align: left;">
<telerik:RadDateTimePicker ID="formExten_AuthEndDate" runat="server" AutoPostBack ="True">
</telerik:RadDateTimePicker>
</td>
The reason is that the default value of the AutoPostBackControl property is None:
http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_raddatetimepicker_autopostbackcontrol.html
http://www.telerik.com/help/aspnet-ajax/t_telerik_web_ui_calendar_autopostbackcontrol.html
I hope the clarification was helpful.
All the best,
Eyup
the Telerik team
Hello Eyup!
Those links are unfortunately dead!
You can check the following articles instead about the mentioned property:
http://docs.telerik.com/devtools/aspnet-ajax/api/server/Telerik.Web.UI/RadTimePicker#properties-AutoPostBackControl
http://docs.telerik.com/devtools/aspnet-ajax/controls/calendar/server-side-programming/server-side-events/selecteddatechanged
http://docs.telerik.com/devtools/aspnet-ajax/controls/calendar/server-side-programming/server-side-events/server-side-events-basics#raddatepicker-radtimepicker-raddatetimepicker-and-radmonthyearpicker
Hope this helps.
Regards,
Eyup
Telerik