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

SelectedDateChanged in RadDateTimePicker

7 Answers 402 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 26 Nov 2012, 08:06 PM
I have  a  RadDateTimePicker in the web page,  the code below, when typing  date in  RadDateTimePicker. the event handler has been  fired, but when picking  up the date in calender. event handler not been fired ,
I don't know why?
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

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Nov 2012, 04:27 AM
Hi Jim,

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.
0
Jim
Top achievements
Rank 1
answered on 27 Nov 2012, 05:15 PM
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
0
Eyup
Telerik team
answered on 29 Nov 2012, 12:40 PM
Hi Jim,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jim
Top achievements
Rank 1
answered on 29 Nov 2012, 11:02 PM

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>

0
Eyup
Telerik team
answered on 04 Dec 2012, 08:23 AM
Hello Jim,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Anders
Top achievements
Rank 1
answered on 07 Apr 2016, 09:58 AM

Hello Eyup!

Those links are unfortunately dead!

0
Eyup
Telerik team
answered on 12 Apr 2016, 06:19 AM
Tags
General Discussions
Asked by
Jim
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jim
Top achievements
Rank 1
Eyup
Telerik team
Anders
Top achievements
Rank 1
Share this question
or