Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date validations - Rookie here 1

Status
Not open for further replies.

JohnShell

Technical User
Aug 29, 2003
35
US
Hi,

Got input boxes for begin and end dates - using JQuery for date picker calendar for each. Need to validate 2 things - 1 is that end date is => than begin date, 2 is that user enters date into begin date rather than just numbers.
I got date picker JQuery from another office where I work and can not change their parameters or code. So my input boxes allow for date picker selection or manual data entry.
The end date input box can be empty if user only inputting one day for begin date and not a range.
Also have 3 more begin/end date input box sets which are not visible until user clicks "Add Row" button - one click, one set added. Want to insure if user added row and input date then removed row (clicked "Remove Row" button) that the data entered is removed and not inserted into database.

Thanks for any help - John
 
john,
can you post the code that you already have for this ?

I'd suggest you take a look at and which cover date functions, so you should be able to convert both textbox values to Date objects, handling errors if they don't convert, and then compare them as you need to.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Mr. Griffiths,

I am looking at the W3schools information and tutorials. That will take a little time to decipher.
Appreciate the reference.

John
 
john,
happy to help, if you have some sample code and test data you can post here, am sure we will be happy to review and tweak your solution.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thank you, sir, for your offer. However, got the js code to validate and compare dates and am now posting it to coldfusion onsubmit where it will notify users of any errors in their entry/ies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top