Test jQuery DatePicker

This test works on IExplorer > 7, Firefox and Opera.

This test fails on Google Chrome and Safari (webkit).

Note that the location of datepicker is correct *

 

Example 01 (FAILS)

Test the diference between Firefox or Explorer and Chrome or Safari (test given dates).

Test with '12/01/2010' and '13/01/2010'. Note that date format is (dd/mm/yy)

Code not works:

				
				/* Important = date: false */				
				mydate: { required: true, date: true }
			

Example 02 (FIXED)

In the following example, the validation does work because I use a custom validation rule

Test the diference between Firefox or Explorer and Chrome or Safari (test given dates).

Test with '12/01/2010' and '13/01/2010'. Note that date format is (dd/mm/yy)

Code works:

				/* Important = date: false */				
				mydate2: { required: true, date: false, isdate: true }
				
				/* CUSTOM Date Validator */				
				var isDate = function(value) {
					var validDate = /^(\d{2})\/(\d{2})\/(\d{4})?$/;	
					return validDate.test(value);
				}	
				$.validator.addMethod("isdate", function(value, element) {
					return isDate(value);
				});