jQuery timepicker and validate not working-Collection of common programming errors
I have two jQuery scripts that are not working on my page, a validate script, and a timepicker. They are not working at all, however datepicker is working. I get the following error for the time picker:
Uncaught TypeError: Object [object Object] has no method ‘timepicker’
However that is the only error I am getting.
This is the code I am using:
jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});
jQuery(document).ready(function($){
$("#datepicker").datepicker();
});
jQuery(document).ready(function($){
$( "#datepicker1" ).datepicker();
});
$(document).ready(function() {
$('#timepicker').timepicker( {
showAnim: 'blind'
} );
});
$().ready(function() {
$("#newapp").validate({
rules: {
facility: {
required: true,
minlength: 3
},
disclaimer: {
required: true,
},
department: {
required: true,
minlength: 3
},
address: {
required: true
},
requestor: {
required: true,
minlength: 2
},
callback: {
required: true,
minlength: 7
},
language: "required"
},
messages: {
facility: {
required: "Please enter a facility",
minlength: "Facility name must be at least 3 characters"
},
department: {
required: "Please enter a department",
minlength: "Department name must be at least 3 characters"
},
address: {
required: "Please enter a address",
minlength: "Address must be at least 5 characters"
},
requestor: {
required: "Please enter a requestor",
minlength: "Requestor name must be at least 3 characters"
},
callback: {
required: "Please enter a callback number",
minlength: "Callback number must be at least 7 characters"
},
language: {
required: "Please enter a language"
}
}
});
});
And the HTML:
Date:
Time :
Client (Other):
Facility:
Department:
Address:
Requestor:
Provider:
Callback #:
Language:
Medicaid:
No Medicaid
Primary Medicaid
Seccondary Medicaid
Medicaid ID:
LES Name:
LES Date of Birth:
Notes: