User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,219 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,256 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2208 | Replies: 2
Reply
Join Date: Jun 2007
Posts: 9
Reputation: sumit_indian has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 1
sumit_indian sumit_indian is offline Offline
Newbie Poster

Help start-date end-date Validation

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: bangalore
Posts: 19
Reputation: aravelli is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
aravelli aravelli is offline Offline
Newbie Poster

Solution Re: start-date end-date Validation

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

Re: start-date end-date Validation

  #3  
Mar 11th, 2008
thank aravelli i really appreciate this ....
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC