View Single Post
 
Old June 12th, 2008, 07:45 AM
abhishekkashyap27 abhishekkashyap27 is offline
Authorized User
 
Join Date: May 2007
Location: Hyderabad, Andhra Pradesh, India.
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Hi Joe

I followed your advice and tried to validate using Javascript. Here is the code:

function fnDate()
  {
    var str = document.getElementById("txtLeaveDt").value
    var SplitDate = str.split(",");
    for(i=0;i<SplitDate.length;i++)
      {
          if(!(mydate(SplitDate[i]))
          //alert("Incorrect format");
          return false;
      }
        return true;
  }

mydate is a function to validate date in dd/mm/yyyy format, i m calling in the If condition. But i am getting error in the If condition. Did syntactically somewhere i went wrong?

-- Abhishek