wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes date validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "date validation " Watch "date validation " New topic
Author

date validation

S Kazi
Greenhorn

Joined: Aug 18, 2008
Posts: 15
hi friends i want to validate the date suppose in first textfield it is 10/12/2008 so in second textfield it should not take back date of it & the current date
EXample

Leave from date 10-12-2008 ----(dd/mm/yy format)
Leave upto date 5-12-2008 -----(dd/mm/yy format)
the above should not done

as well as it should not take current date
Leave from date 10-12-2008 ----(dd/mm/yy format)
Leave upto date 10-12-2008 -----(dd/mm/yy format)

if any one know how to deal it with kindly answer thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Searching Google comes back with a slew of answers to this quite common question.


GenRocket - Experts at Building Test Data
S Kazi
Greenhorn

Joined: Aug 18, 2008
Posts: 15
Originally posted by Gregg Bolinger:
Searching Google comes back with a slew of answers to this quite common question.


hi have searched on google buddy it is giving validation of date not like this if you can find it out send me a link
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by S Kazi:


hi have searched on google buddy it is giving validation of date not like this if you can find it out send me a link


Oh, I'm sorry. I didn't realize you wanted someone to do your work for you. We are not a code mill.. It would be better if you show us what you have tried so far and asked specific questions about where it fails.
S Kazi
Greenhorn

Joined: Aug 18, 2008
Posts: 15
Originally posted by Gregg Bolinger:


Oh, I'm sorry. I didn't realize you wanted someone to do your work for you. We are not a code mill.. It would be better if you show us what you have tried so far and asked specific questions about where it fails.


Dear Gregg, I am not saying to do my work I just want Idea that how it should be done ok...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Please do not PM me to answer your question. My job is to not answer questions.

What have you done? Do you know how to convert a string to a date? Do you know how to get the current date? Do you know how to run some sort of validation function?

Show us some stuff.

Eric
Aditya Keyal
Ranch Hand

Joined: Dec 01, 2008
Posts: 71
Use the following code snippet:

and if you want to know how to seperate the yeah, month and date , well when ive been so lucid:-

use the String.split method of javascript. Google for more details if you ant


- Aditya Webservices Blog
 
 
subject: date validation
 
Similar Threads
Problem getting correct date format
Blind dates.
java date
is it normal behaviour of SImpleDateFormat?
Date format in Sun voucher.