Date Validation in HTML

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

Join Date: Aug 2006
Posts: 1
Reputation: top is an unknown quantity at this point 
Solved Threads: 0
top top is offline Offline
Newbie Poster

Date Validation in HTML

 
0
  #1
Aug 25th, 2006
Hi,
This is the first time i am posting any thread.Please let me know where i went wrong in posting my problem.

PROBLEM:-I am having 2 calenders - one is from_date & the other is to_date.The difference between the two dates which i select in the respective calenders (from_date:-06/08/25 , to_date:-06/08/30)should not be more than 5.In case it is ,it should throw an alert.I want to know the javascript for this .If anyone can help me out with this as soon as possible.

Thanks,
Top.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 434
Reputation: FC Jamison is on a distinguished road 
Solved Threads: 20
Team Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Date Validation in HTML

 
0
  #2
Aug 25th, 2006
Without seeing your script, I would suggest using an if statement.

something along the lines of

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. if (dateb-datea > 5) { alert('The dates are more than 5 days apart'); }
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