Con due cifre per l'anno però bisogna supporre che sia sottointeso un secolo specifico (ad es. il 21-esimo
ovvero 01/01/98 => 01/01/2098) altrimenti non si può ritornare un oggetto data valido


codice:
function dataValida(obj){
	var re = /^\d{1,2}\/\d{1,2}\/\d{2}$/
	txt = obj.value;
	if  (txt == ""){
	return false;
	}
	else if(re.test(txt)){
		var adata = txt.split('/');
		var gg = parseInt(adata[0],10);
		var mm = parseInt(adata[1],10);
		var aa = parseInt(adata[2],10);
        var aaaa = 2000 + aa;
		return new Date(aaaa,mm-1,gg)

	
	}
	alert("Formato DATA NON VALIDO (gg/mm/aa)");
	return false;
}