Reputation: 439
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:
datetimepicker CSS
<!doctype html>
<meta charset="utf-8">
<title>Example</title>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-sliderAccess.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-timepicker-addon.css">
<script>
$function () {
$('#input').datetimepicker();
});
</script>
<title>Example</title>
</head>
<body>
<input type="text" id="input" name="input" value=""/>
</body>
</html>
Nothing displays when clicking on the form.
Upvotes: 2
Views: 337
Reputation: 67505
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
Reputation: 36703
$function () {
$('#input').datetimepicker();
});
should be
$(function () {
$('#input').datetimepicker();
});
Upvotes: 1