DateInput ClientEvents not working

3 posts, 0 answers
  1. Chris McGrath
    Chris McGrath avatar
    23 posts
    Member since:
    Dec 2009

    Posted 08 Jul 2010 Link to this post

    Hi, I'm trying to use some of the client events of the DateInput in the RadDatePicker and anytime I assign any of the client events a function, not only do they not work, but the date validation stops running and clicking the calendar icon does not bring up the calendar.

    One example is as follows:

    <telerik:RadDatePicker ID="rdpNotifyDate" runat="server">
        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>
        <DatePopupButton HoverImageUrl="" ImageUrl="" />
        <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
            <ClientEvents OnBlur="blur();" />

    I can put any code in the blur() function, none of them work (alerts, changing the values of controls on the page, even nothing at all).  Just having that assignment to do something OnBlur stops the control from working. 

    I've tried using the OnFocus and OnValueChanged clientevents as well, with the same results.

    Just for fun I even tried to create a new RadDatePicker on a different page:

    <telerik:RadDatePicker ID="rdp" runat="server" ClientEvents-OnDateSelected="alert('hello');"></telerik:RadDatePicker>

    Without the client event, it works.  With the event, nothing works.. no calendar popup, no date validation.

    Thanks in advance,

  2. Dimo
    Dimo avatar
    8486 posts

    Posted 09 Jul 2010 Link to this post

    Hello Chris,

    The event handler is not assigned correctly and you get Javascript errors on the page.

    A function name should be assigned without brackets:

    <ClientEvents OnBlur="blur"  />

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Chris McGrath
    Chris McGrath avatar
    23 posts
    Member since:
    Dec 2009

    Posted 09 Jul 2010 Link to this post

    That was it, thanks. 
Back to Top