Click to See Complete Forum and Search --> : Help for Date forms!!!


rterres
October 6th, 2005, 07:34 PM
Hello every one.....

Im looking for some javascripts that make two validations...
first when te user fill one field with the date like 06/10/2005
other automaticaly fill a year after... 05/10/2006 european format.
this is for stablish a period of one year contract.

but it has other validation .. when the user fills the first date... that date can not be older than one month
it means... today is 06/10/2005 the date captured never be older than
06/09/2005

do any one of you know where i can find scripts like these...
or something similar????

thak you!!!!

Best regards for all
Rodrigo T.

PeejAvery
October 6th, 2005, 09:50 PM
Both are just problems of math. You can use split("/") to break up the day, month, and year. From there all you need is simple math to tell which date is older and by how much.