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

Client side events not working after creating a wrapper over Telerik.Web.UI.RadDatePicker

2 Answers 37 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Gun
Top achievements
Rank 1
Gun asked on 11 Jun 2014, 08:37 AM
I have a wrapper class over RadDatePicker.
public class DatePicker : Telerik.Web.UI.RadDatePicker
{
    public DatePicker()
        : base()
    {
        //
        // Some code her
        //
    }
}
Now, I have my own implementation here. I want to use the event's like DateInput-ClientEvents-OnBlur:
<tele:DateTimePicker id="date" runat="server" autopostback="true" DateInput-ClientEvents-OnBlur="alert('Ding');"/>

But, I couldn't get it working. Not getting what did I miss.
Thanks.
IO

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 12 Jun 2014, 06:30 AM
Hi,

Please try to attach the OnBlur event of RadDatePicker as follows.

ASPX:
<telerik:RadDatePicker ID="date" runat="server" AutoPostBack="true" DateInput-ClientEvents-OnBlur="Blur" />

JavaScript:
function Blur() {
    alert("fired");
}

Thanks,
Shinu.
0
Gun
Top achievements
Rank 1
answered on 12 Jun 2014, 09:40 AM
I tried that before. But this event gets appended to the <span> element.
<span style="display: inline-block; width: 115px;" dateinput-clientevents-onblur="alert('Ding');"
          class="datepickerstyles" id="Span1"><span style="display: none;" class="readonlylabel readonlydatetimelabel"
                                                    title="15/10/2013 ">15/10/2013 </span>
                                                    <!--SOME HTML-->
        <input type="text" style="width: 100%;" class="riTextBox riEnabled datepickerstyles"
            name="ctl00_DialogContent_dtpDate_InternalRadDatePicker1_dateInput_text" id="ctl00_DialogContent_dtpDate_InternalRadDatePicker1_dateInput_text"
            value="15/10/2013" maxlength="2147483647">
    </span>

I don't get it why is the vent getting appended to the span element.

Tags
Calendar
Asked by
Gun
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Gun
Top achievements
Rank 1
Share this question
or