We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error: object doesn't support property or method datetime picker even though I have javascript references?

I have referenced javascript files for the datetime picker ASP.NET control but I cannot seem to get the control to work. Here's my references in my site.master file:

<link rel='nofollow' href="Content/ej/web/default-theme/ej.web.all.min.css" rel="stylesheet" />

<script src="Scripts/jquery-1.10.2.min.js"></script>

<script src="Scripts/jquery.easing.1.3.min.js"></script>

<script src="Scripts/jquery.globalize.min.js"></script>

<script src="Scripts/jsrender.min.js"></script>

<script src="Scripts/ej/ej.web.all.min.js"></script>

Here are some references from my web.config to see if I have it configured properly:

<add assembly="Syncfusion.EJ.Web, Version=13.3460.0.12, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89" />

<add assembly="Syncfusion.EJ, Version=13.3460.0.12, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89" />

Can anyone help me out as to what references I am missing or overlapping?

P.S. I even commented out the default jquery reference but it did not help. In addition, I tried putting the control into a new project and referencing the javascript nuget package but it does not help either.




5 Replies

ES Ezhil S Syncfusion Team November 11, 2015 09:23 AM UTC

Hi Jeffry,

Thank you for contacting Syncfusion support.

Based on the shared details we are unable to reproduce the issue at our end in version 13.3.0.12. The reported issue with rendering Syncfusion ASP.NET control may occur if the JQuery script conflicts or any JQuery script referred after the “ej.web.all.min.js” script. Please refer the following KB links,
https://www.syncfusion.com/kb/5091/why-do-i-get-javascript-error-of-ej-undefined-while-running-an-application-with-syncfusion-controls
https://www.syncfusion.com/kb/4553/how-to-resolve-the-javascript-runtime-error-is-undefined-with-the-syncfusion-controls

We have provided with embedded resource support that adds the necessary scripts/CSS required to render the EJ components from the assembly by default from release version 13.2.0.29. While enabling LoadEJResourcesFromAssembly and EJResources app key settings in web.config file as shown below code, it will include the necessary script and CSS files as embedded resource from the Syncfusion.EJ.Web assembly itself.
<code>
[Web.Config]

<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="true" />

    <add key="EJResources" value="jsrender:true;jqueryeasing:true;globalize:true;themes:true;" />
  </appSettings>
</code>

If you are referring scripts and CSS externally, refer the necessary scripts and CSS files in Site.Master page
 and set false to the LoadEJResourcesFromAssembly” key which is in the web.config file, it will skip the scripts and CSS files reference from assembly. 

<code>

<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="false" />    
  </appSettings>
</code>

If the above solutions did not resolve the issue at your end, check on the developer window and share us screenshot if any console error arise. Also share us with issue reproducible sample, so that we can provide you an alternative solution.

Sample link: http://www.syncfusion.com/downloads/support/forum/121102/ze/DateTimePicker_f1211021993600931

Kindly let us know if you have further queries.

Regards,
Ezhil S



JC jeffery carlson replied to Ezhil S November 11, 2015 04:34 PM UTC

Hi Jeffry,

Thank you for contacting Syncfusion support.

Based on the shared details we are unable to reproduce the issue at our end in version 13.3.0.12. The reported issue with rendering Syncfusion ASP.NET control may occur if the JQuery script conflicts or any JQuery script referred after the “ej.web.all.min.js” script. Please refer the following KB links,
https://www.syncfusion.com/kb/5091/why-do-i-get-javascript-error-of-ej-undefined-while-running-an-application-with-syncfusion-controls
https://www.syncfusion.com/kb/4553/how-to-resolve-the-javascript-runtime-error-is-undefined-with-the-syncfusion-controls

We have provided with embedded resource support that adds the necessary scripts/CSS required to render the EJ components from the assembly by default from release version 13.2.0.29. While enabling LoadEJResourcesFromAssembly and EJResources app key settings in web.config file as shown below code, it will include the necessary script and CSS files as embedded resource from the Syncfusion.EJ.Web assembly itself.
<code>
[Web.Config]

<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="true" />

    <add key="EJResources" value="jsrender:true;jqueryeasing:true;globalize:true;themes:true;" />
  </appSettings>
</code>

If you are referring scripts and CSS externally, refer the necessary scripts and CSS files in Site.Master page
 and set false to the LoadEJResourcesFromAssembly” key which is in the web.config file, it will skip the scripts and CSS files reference from assembly. 

<code>

<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="false" />    
  </appSettings>
</code>

If the above solutions did not resolve the issue at your end, check on the developer window and share us screenshot if any console error arise. Also share us with issue reproducible sample, so that we can provide you an alternative solution.

Sample link: http://www.syncfusion.com/downloads/support/forum/121102/ze/DateTimePicker_f1211021993600931

Kindly let us know if you have further queries.

Regards,
Ezhil S


In my new project, I started a VB.NET web forms project under the web project type in visual studio. I have the control appearing in that one but it will not close. I think I will double check my references and post back. One question I am wondering about is: will bootstrap cause issues when its referenced from a new project?


AP Arun Palaniyandi Syncfusion Team November 12, 2015 12:54 PM UTC

Hi Jeffry,

Thanks for the update

Based on your shared details we are unable to reproduce the issue with DateTimePicker at our end. Bootstrap will not cause any problem with our control when it is referenced in your project, we have prepared DateTimePicker sample using Bootstrap and it is available below link:


http://www.syncfusion.com/downloads/support/forum/121102/ze/DateTimePicker1739258592

In the above sample, we have checked with Bootstrap 2.3 and the DateTimePicker is working fine. If still you face the same problem, could you please share details for the following queries.

1)      Is any error thrown in console window? If yes, share the screenshot of the error.

2)      Have you overridden the styles of DateTimePicker? Is there any position specified for the DateTimePicker container element?

Please share the above requested information, your ASPX code and the CSS that you have referred so that we could analyze further and provide a solution.
Regards,
Arun P




JC jeffery carlson November 13, 2015 01:13 PM UTC

I can confirm in a new project that referencing the datetimepicker works maybe its a configuration issue with my current website.


ES Ezhil S Syncfusion Team November 17, 2015 06:12 AM UTC

Hi Jeffery,

Sorry for the inconvenience caused.

As updated earlier, we are unable to reproduce the issue based on the shared information at our end. Could you please share the following details,
1)      Does the sample works fine in local machine and issue when hosted in server?
2)      Do you face any errors in the website? If so share us screenshot of the error from the developer window?
3)      If there is configuration issue, share us your ASPX page and Web.config file details.
4)      Also provide us details exactly what issue you are facing in your website to use DateTimePicker, whether control is not rendering or the page itself is not loading?

Please share the requested information, so that we could analyze further and provide a solution.

Regards,
Ezhil S


Loader.
Live Chat Icon For mobile
Up arrow icon