Reputation: 4324
Does any body know what these errors coming from my error console mean while I am using trent richardson's timepicker? What do I need to do?
$.timepicker is undefined
this line in the jsfile: $t.datepicker($.timepicker._newInst($t, o)._defaults);
$.datepicker is undefined
this line in the jsfile: $.datepicker._base_selectDate = $.datepicker._selectDate;
trent richardson's jsfile: http://trentrichardson.com/examples/timepicker/js/jquery-ui-timepicker-addon.js
my jsfile has been linked :
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<title>Prepare Questions and Answers</title>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>
<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>
jquery code:
$(function() {
$('#answerdurationpicker').timepicker({
timeFormat:'hh mm ss',
hourGrid: 4,
minuteGrid: 10,
secondGrid: 10,
showOn: 'button',
buttonImage: "Images/clock.gif",
buttonImageOnly: true
});
});
Upvotes: 1
Views: 3191
Reputation: 1297
I think you forgot to include jqueryui, which is a separate library from jquery. You should include it right after base jquery. You'll have to download it and modify your code to something like this:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" href="jquery/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
<title>Prepare Questions and Answers</title>
<link rel="stylesheet" type="text/css" href="jquery/ui-lightness/jquery-ui-timepicker-addon.css"/>
<script type="text/javascript" src="jquery/jquery-ui-timepicker-addon.js"></script>
Upvotes: 1