I am trying to use the Jquery UI timepicker but when I click on the text box, the timepicker is not displayed. What I want to know is have I included all of the requirements for this type of plugin and is the function for the timepicker correct?
Below is the code:
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Create a Session</title>
<link rel="stylesheet" type="text/css" href="MyStyles.css">
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery.ui.timepicker.css"/>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-1.8.14.custom.css"/>
<script type="text/javascript" src="jquery/jquery.ui.timepicker.js"></script>
<script type="text/javascript">
$(function() {
$( "#timepicker" ).timepicker();
});
</script>
</head>
<body>
<form action="create_session.php" method="post" name="sessionform">
<p><strong>5: Time:</strong><input type="text" id=""></p>
</form>
</body>
Your jquery selector is looking for an element with the
idoftimepicker.In your example there are no elements with that
idYou need to set the
idof theinputelement totimepicker.Example: