codice:
<script>
function ctrl_date(f) {
ggd = f.giorno_dal.options[f.giorno_dal.selectedIndex].value;
mmd = f.mese_dal.options[f.mese_dal.selectedIndex].value;
aad = f.anno_dal.options[f.anno_dal.selectedIndex].value;
data1 = new Date(aad, mmd -1, ggd);
gga = f.giorno_al.options[f.giorno_al.selectedIndex].value;
mma = f.mese_al.options[f.mese_al.selectedIndex].value;
aaa = f.anno_al.options[f.anno_al.selectedIndex].value;
data2 = new Date(aaa, mma -1, gga);
if (data1 >= data2) {
alert("Controlla le date");
return false;
}
}
</script>
...
<form ... onsubmit="return ctrl_date(this)">
Se le tue select restituiscono il numero del giorno, mese e anno dovrebbe funzionare
ciao