RK1
RK1

Reputation: 439

Trentrichardson datetimepicker doesn't work

I'm trying to use the Following timepicker. However, I'm not able to run it. I'm using jsDelivr CDN as suggested by the author.

I include all files listed by the author in the correct order:

Nothing displays when clicking on the form.

Upvotes: 2

Views: 337

Answers (2)

Zakaria Acharki
Zakaria Acharki

Reputation: 67505

Working fiddle.

The problem is in the includs the following example will work :

<!doctype html>
<meta charset="utf-8">
<title>Example</title>
<html>
    <head>
        <title>Example</title>

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.4.5/jquery-ui-timepicker-addon.min.css" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.css" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.4.5/jquery-ui-timepicker-addon.min.js"></script>
    </head>
    <body>
        <input type="text" id="input" name="input" value=""/>

        <script>
            $(function () {
                $('#input').datetimepicker();
            });
        </script>
    </body>
</html>

Hope this helps.

Upvotes: 1

void
void

Reputation: 36703

$function () {
    $('#input').datetimepicker();
});

should be

$(function () {
    $('#input').datetimepicker();
});

Upvotes: 1

Related Questions