hi all,
i need javascript function to validate the Date of birth field...it should check,leap year condition and also the year should nt be the future one..
Thank u...
hi all,
i need javascript function to validate the Date of birth field...it should check,leap year condition and also the year should nt be the future one..
Thank u...
Jump to Postcheck this link: http://www.kourbatov.com/faq/browsern.htm
U can also try this
/*Validate Date */
var year;
var leap = 0;
var DOB = Date;
if(IsNan(DOB == true))
{
alert(“The DOB must be in the format of “DD/MM/YYYY”)
document.frmName.txtDOB.select;
return false;
}
/* Validation leap-year / february / day */
if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0))
{
leap = 1;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.