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

DatePickerClientEvents does not have a public property named 'OnLoad'

2 Answers 92 Views
Input
This is a migrated thread and some comments may be shown as answers.
Kennon McCaa
Top achievements
Rank 1
Kennon McCaa asked on 25 Oct 2014, 01:24 PM
Can anyone explain why I get the following error?

System.Web.HttpParseException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'. ---> System.Web.HttpException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'.

The Telerik documentation on this page http://www.telerik.com/help/aspnet-ajax/input-client-side-onload.html states the following:
  The OnLoad event is supported by all RadInput controls.

Here's my markup:
<telerik:RadDateTimePicker
      ID="m_dpTargetDate"
      runat="server">
         <ClientEvents OnLoad="m_dpEventBegin_Load" />
</telerik:RadDateTimePicker>

<script type="text/javascript">
var m_dpEventBegin = null;
function m_dpEventBegin_Load(sender, args) {
      m_dpEventBegin = sender;
}
</script>

I can get other client-side events to fire.

Any help would be greatly appreciated.

2 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 28 Oct 2014, 06:44 AM
Hello Kennon,

The RadDatePicker is not inherited from RadInputControl. The Picker essentially use RadDateInput and popup with RadCalendar.

You can access the DateInput of the picker and use its Load event:
<telerik:RadDatePicker runat="server">
    <DateInput>
        <ClientEvents OnLoad="youFunction" />
    </DateInput>
</telerik:RadDatePicker>

Note that Intelisense of Visual Studio can underline the usage of the "DateInput" as warning, but this is a bug in the VS. The code above will compile and work correctly


Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Kennon McCaa
Top achievements
Rank 1
answered on 30 Oct 2014, 05:36 PM
Thank you Vasil. That worked perfectly.
Tags
Input
Asked by
Kennon McCaa
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Kennon McCaa
Top achievements
Rank 1
Share this question
or