CrazyPaste CrazyPaste - 2 months ago 15x
HTML Question

Telerik RadDatePicker and JavaScript error: Uncaught TypeError: a[b] is not a function

In my C# Webforms project I have a

control set to run a
function. Each time I select a date, I get this Javascript error:

Uncaught TypeError: a[b] is not a function

function SetDateSession() {

<telerik:RadDatePicker ID="StartDatePicker" runat="server">
<ClientEvents OnDateSelected="SetDateSession()" />

I've stripped everything out of the function, as you can see, and all I have left in my project is this simple code. Which is why it's difficult for me to fix. I tried this and it works like it's supposed to:

<input type="button" id="RepBtn" onclick="SetDateSession()" value="View" runat="server"/>

Here's what the console is looking like:

enter image description here

With such little code, and not knowing much about the inner workings of JavaScript, I'm just not sure what to try from here.


What a waste of time on such a stupid thing! Basically this

<ClientEvents OnDateSelected="SetDateSession()" />

should be this

<ClientEvents OnDateSelected="SetDateSession" />

Lesson learned, Telerik! Thank you.