ClientEvents-OnValueChanged, ClientEvents-OnBlur, or ClientEvents-OnValueChanging not firing

5 posts, 0 answers
  1. Keith
    Keith avatar
    61 posts
    Member since:
    May 2008

    Posted 05 Dec 2008 Link to this post

    I have attempted to call a client-side JS funciton using:


    and server side using:
        radDatePicker.ClientEvents.OnDateSelected = "clearErrorMsg";
        radDatePicker.DateInput.ClientEvents.OnValueChanged = "clearErrorMsg";
        radDatePicker.DateInput.ClientEvents.OnBlur = "clearErrorMsg";

    either way the JS function does not get called. The ClientEvents-OnError="OnError" in the following code works just fine

    <script language="javascript">
        function OnError(sender, args) {
            var datePicker = $find(sender.get_id());
            var MinDate = new Date(datePicker.get_minDate());
            var MM_Min = MinDate.getDate();
            var DD_Min = MinDate.getMonth() + 1;
            var YY_Min = MinDate.getFullYear();
            var MaxDate = new Date(datePicker.get_maxDate());
            var MM_Max = MaxDate.getDate();
            var DD_Max = MaxDate.getMonth() + 1;
            var YY_Max = MaxDate.getFullYear();
            var sMinDate = DD_Min + "/" + MM_Min + "/" + YY_Min
            var sMaxDate = DD_Max + "/" + MM_Max + "/" + YY_Max
            //alert("Please enter a valid date between " + sMinDate + " and " + sMaxDate);
            var errorID = sender.get_id() + "_error";

            if ($("#" + errorID) != null) {
                $("#" + errorID).remove();
            $("#" + sender.get_id()).parent().parent().parent().parent().parent().after('<div id="' + errorID + '" class="valErrorUp DateValError"> Please enter a valid date between ' + sMinDate + ' and ' + sMaxDate + '</div>');

    function clearErrorMsg(sender, args) {
        alert('got here');
        var datePicker = $find(sender.get_id());
        var errorID = sender.get_id() + "_error";

        if ($("#" + errorID) != null) {
            $("#" + errorID).remove();

    <telerik:RadDatePicker ID="radDatePicker" runat="server" Width="100px" CssClass="IndentAnswer" DateInput-FocusedStyle-BackColor="#F1F6FC"  ClientEvents-OnDateSelected="clearErrorMsg">
        <DateInput ClientEvents-OnError="OnError" ClientEvents-OnValueChanged="clearErrorMsg"  ClientEvents-OnBlur="clearErrorMsg" ClientEvents-OnValueChanging="clearErrorMsg"></DateInput>
        <Calendar ViewSelectorText="x" ShowRowHeaders="false" ClientEvents-OnDateSelected="clearErrorMsg"></Calendar>

    What I am I missing?

    Thanks in advance.
  2. Pavel
    Pavel avatar
    904 posts

    Posted 08 Dec 2008 Link to this post

    Hi Keith,

    Please find attached a simple website which illustrates that the client-side events are called as expected. Give it a try and let me know if I am missing something important.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Anil Sahu
    Anil Sahu avatar
    9 posts
    Member since:
    Aug 2009

    Posted 31 Aug 2009 Link to this post

    Hello Team,
               I am using Rad Calendar Control.I am facing one problem,and that is..
              when i am clicking on the Calendar control , its showing me Calender ,
              which is perfect but when i  am clicking on page instead of Date(Date not selected yet),
              I should get Message .
             My main motivation behind this  is , how to get lost focus event of calendar control?
             Rad Calendar control is composite of Textbook(Where selected date is displayed)
             and second is Image(where we click to get select date)
             I used Blur , but here focus should be there in control(calendar) then it is working properly,
            but here once we lost focus from Image control, i should be able to get Message..
    Anil Sahu

  4. DQ
    DQ avatar
    7 posts
    Member since:
    Aug 2012

    Posted 16 Aug 2012 Link to this post

    Do we have this resolved yet?  I am running into the same issue here.  It works for a while, and suddenly, the multi-row select stops working and so the allow row selecting.
  5. Martin
    Martin avatar
    833 posts

    Posted 20 Aug 2012 Link to this post

    Hello DQ,

    Since your scenario is different than the one this forum thread discusses, please open a formal support ticket providing more details about your case. A sample runnable page or code snippet as well as step by step instructions about how to replicate the issue would also help for the quick resolution of the problem.

    Kind regards,
    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.
Back to Top