• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

date validation

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Searching Google comes back with a slew of answers to this quite common question.
 
S Kazi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Everyone is a villain in someone else's story. Especially this devious tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic