Do I need to mention my date field (EffectiveDate) someone in this code so it knows where to pull the date from?
Aside from that question, is this code set up to validate the date in MM/DD/YYYY
var nd = new Date(yr,mm,dd); // format YYYY,MM(0-11),DD
var ndmm = nd.getMonth();
if (ndmm != mm)
alert (dd + "/" + mmx + "/" + yr + " is an Invalid Date!"); return false;
alert (dd + "/" + mmx + "/" + yr + " is an Valid Date!"); }
The two lines in green are the same so how does that work?
And I have this piece of code in my function to validate the form:
if ( ! checkValidDate( frm.elements["EffectiveDate."] ) )
oops += "You must enter your Effective Date of Move in the proper format (MM/DD/YYYY).\n";
So do I even need an alert in the function above?
Again I am a beginner with this type of stuff so I'm trying to figure it out. I appreciate your guys patience with me...I know sometimes that isn't easy.