Hi,
i created this function that takes a string parameter from a form. This string basically consists of a date in the format of mm/dd/yyyy. Now, im not too sure how to convert this string to a date so that i can compare fi the user date is greater than the current date?...here is what i did...but im sure it is wrong.
dateSelect = Date.Parse(userDate);
if(dateSelect < getDate())
{
alert("Please enter a valid date. Thank you!");
form.dateTextField.focus();
return false;
}
i created this function that takes a string parameter from a form. This string basically consists of a date in the format of mm/dd/yyyy. Now, im not too sure how to convert this string to a date so that i can compare fi the user date is greater than the current date?...here is what i did...but im sure it is wrong.
dateSelect = Date.Parse(userDate);
if(dateSelect < getDate())
{
alert("Please enter a valid date. Thank you!");
form.dateTextField.focus();
return false;
}