SelectedDateChanged in RadDateTimePicker

8 posts, 0 answers
  1. Jim
    Jim avatar
    3 posts
    Member since:
    Aug 2012

    Posted 26 Nov 2012 Link to this post

    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

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

    Posted 26 Nov 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jim
    Jim avatar
    3 posts
    Member since:
    Aug 2012

    Posted 27 Nov 2012 Link to this post

    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
  5. Eyup
    Admin
    Eyup avatar
    3013 posts

    Posted 29 Nov 2012 Link to this post

    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.
  6. Jim
    Jim avatar
    3 posts
    Member since:
    Aug 2012

    Posted 29 Nov 2012 Link to this post

    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>

  7. Eyup
    Admin
    Eyup avatar
    3013 posts

    Posted 04 Dec 2012 Link to this post

    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.
  8. Anders
    Anders avatar
    4 posts
    Member since:
    Feb 2016

    Posted 07 Apr in reply to Eyup Link to this post

    Hello Eyup!

    Those links are unfortunately dead!

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017