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 423,276 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 5,291 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: 2163 | Replies: 2
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  

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 10:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC