Thread: Date validation
View Single Post
  #5 (permalink)  
Old February 25th, 2004, 04:04 PM
Raul Raul is offline
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got it to work thanks!

var today = new Date()
    var day = today.getDate()
    var month = today.getMonth()+1
    var year = today.getFullYear()
    var s = "/"
    var mydate = day + s + month + s + year

    if (Date.parse(FchIni.value) >= Date.parse(FchFin.value))
    {
    alert("Start Date must be equal or greater than todays date
    return false;
    }
    if (form.FchIni.value < mydate)
    {
    alert("%#%/!");
    return false;
    }
}

Reply With Quote