start-date end-date Validation

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2007
Posts: 9
Reputation: sumit_indian has a little shameless behaviour in the past 
Solved Threads: 1
sumit_indian sumit_indian is offline Offline
Newbie Poster

start-date end-date Validation

 
0
  #1
Mar 4th, 2008
Hello Friends ,
I m new in Javascript
i m trying to validate two date coming in the format 'DD-MON-YYYY' coming through PopUP-Calendar in two textboxes but unable to get required result I musing following function :
<script type="text/javascript">
function check(){
var SDate = document.form.previous_date.value;
var EDate = document.form.next_date.value;

if (SDate == '' || EDate == '') {
alert("Plesae enter both....");
return false;
}

var endDate =new Date.parse(EDate);
var startDate =new Date.parse.Date(SDate);


if(startDate > endDate)
{
alert("Please ensure that the End Date is greater than or equal to the Start Date.");
document.calldate.next_day.focus();
return false;
}
}
</script>


Thank In Advance
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 21
Reputation: aravelli is an unknown quantity at this point 
Solved Threads: 2
aravelli aravelli is offline Offline
Newbie Poster

Re: start-date end-date Validation

 
0
  #2
Mar 5th, 2008
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 9
Reputation: sumit_indian has a little shameless behaviour in the past 
Solved Threads: 1
sumit_indian sumit_indian is offline Offline
Newbie Poster

Re: start-date end-date Validation

 
0
  #3
Mar 11th, 2008
thank aravelli i really appreciate this ....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC