rmagan
05-04-2006, 12:22 PM
I am trying to take the date value (format MM/DD/YYYY) of my input field, do calclulations on it and store the calculated value in a differnt field. Sometimes I need to add 1 year to the date and sometimes 30 days. I can't seem to understand how to do the calculations on a date. Can someone show me how to add 1 year or 30 days to a field?
<input type="text" name="p_iep_team_meeting_date" size="9" maxlength="10" onBlur="calc_due_date(this)>
function calc_due_date(iep_team_date)
{
var in_date = stripCharString(iep_team_date.value," ");
var ms = Date.parse(in_date);
document.post_sped_demographic.p_iep_due_date.value = ms;
}
<input type="text" name="p_iep_team_meeting_date" size="9" maxlength="10" onBlur="calc_due_date(this)>
function calc_due_date(iep_team_date)
{
var in_date = stripCharString(iep_team_date.value," ");
var ms = Date.parse(in_date);
document.post_sped_demographic.p_iep_due_date.value = ms;
}