Click here to Skip to main content
15,886,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have a php modal form with datepicker control and i have done validation

Here is my coding
JavaScript
<script type="text/javascript" language="javascript">
var $j=jQuery.noConflict();
function ff()
{

$j('#txtUserName').datepicker({
   onSelect: function(dateText, inst) { 
       dateAsString = dateText; //the first parameter of this function
     var dateAsObject = $(this).datepicker( 'getDate' ); //the getDate method
	  //alert(dateAsObject);
	  
	  var vv=$j.datepicker.formatDate('yy-mm-dd', dateAsObject);
	  $j('#txtUserName').val(vv);
		
	  $j(this).datepicker( 'destroy' );
   }
});
} 

$j(document).ready(function(){

		$j("#form1").validate({
		
			debug: false,
			rules: {
				txtDate:{ 
				 
				required:true
				 
				
				},
				txtPassword: {
					required: true
					
				}
				}
				});
				
	});

but its giving error as object doesn't support this property or method.
How to solve this? Pls help
Posted
Comments
Sandeep Mewara 21-Feb-13 11:20am    
Well, it simply means at whatever line you are getting this, you have an undefined method/property to an object.

Until it is defined, you cannot use it.
Sergey Alexandrovich Kryukov 21-Feb-13 11:36am    
My 5!
—SA
Sandeep Mewara 21-Feb-13 11:48am    
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900