onchange not raised when dateinput gets date after selection from calandar

3 posts, 0 answers
  1. Roger Manderville
    Roger Manderville avatar
    4 posts
    Member since:
    Aug 2008

    Posted 01 Dec 2008 Link to this post


    I am tring to call a javascript function when a date is selected using the date picker. I am using the onchange event of the embedded DateInput control. When I type in a date this works fine. When I select a date from the calendar, the onchange event is not being raised. Should I not expect the onchange event to be raised when the date is set using the calendar? If not, what event would I use?

    Thank You.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Dec 2008 Link to this post

    Hi Roger Manderville,

    I guess you want to call a JavaScript function on selecting the date from RadDatePicker. You can call the JavaScript on OnDateSelected="ondateselected" event of RadDatePicker to achieve this.

    <telerik:RadDatePicker ID="RadDatePicker1" Runat="server"
                <ClientEvents OnDateSelected="OnDateSelected"/>             

    <script type="text/javascript"
    function OnDateSelected() 

  3. Roger Manderville
    Roger Manderville avatar
    4 posts
    Member since:
    Aug 2008

    Posted 03 Dec 2008 Link to this post

    Hi Shinu,

    Actually, I am calling local web services as described in the article below:


    I construct the web service call dynamically in code and then assign the call using attributes.add (for the standard controls). I also allow the programmer to pass in javascript code to be executed before the call and after. 

    With the date picker I am using ClientEvents.OnDateSelected and assigning the web service call to this property but I get the following error:

    Microsoft JScript runtime error: Sys.InvalidOperationException: Handler must be a function.

    Any ideas?

Back to Top