Skip to content Skip to sidebar Skip to footer

Error "uncaught Typeerror: $(...).datetimepicker Is Not A Function"

I am trying to display two datetimepickers but i'm getting the error 'Uncaught TypeError: $(...).datetimepicker is not a function' . I've installed : Install-Package Bootstrap.v3.

Solution 1:

Just include this on top of the other js files:

<scriptsrc="https://code.jquery.com/jquery-1.11.3.min.js"></script>

And wrap your script like this:

jQuery(document).ready(function($){
        jQuery("#txtdatepicker1").datetimepicker();
        jQuery("#txtdatepicker2").datetimepicker();
});

Solution 2:

Make sure you included the right path of jquery script and must be the first in the head tag of the html you can get the latest jquery script here https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js

Solution 3:

You need to include the jQuery library before you can use jQuery UI n your page.

How to use jQuery UI

Like this

<linkhref="jquery-ui.min.css"><scriptsrc="external/jquery/jquery.js"></script><scriptsrc="jquery-ui.min.js"></script>

Solution 4:

jQuery UI is dependant on the jQuery library.

jQuery UI is a widget and interaction library built on top of the jQuery JavaScript Library that you can use to build highly interactive web applications.

https://learn.jquery.com/jquery-ui/getting-started/

Make sure you include a reference to it before jQuery UI:

<head><title></title>
    -- jQuery.js reference here --
    <scripttype="text/javascript"src="~/Scripts/jquery-ui-1.11.4.min.js"></script><scripttype="text/javascript"src="~/scripts/moment-with-locales.min.js"></script>

Post a Comment for "Error "uncaught Typeerror: $(...).datetimepicker Is Not A Function""