stemitch2000
Programmer
hello,
I have two text fields containing dates, a start date and a due date. I would like to compare these dates so that the user can not enter a due date that is before the start date.
This is the code I have so far. Any suggestions will be greatly appreciated.
if (new_detail.start.value > new_detail.duedate.value) {
alert("The Due Date can not be before Start Date."
document.new_detail.duedate.focus();
}
I have two text fields containing dates, a start date and a due date. I would like to compare these dates so that the user can not enter a due date that is before the start date.
This is the code I have so far. Any suggestions will be greatly appreciated.
if (new_detail.start.value > new_detail.duedate.value) {
alert("The Due Date can not be before Start Date."
document.new_detail.duedate.focus();
}