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 391,549 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 2,543 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: 3075 | Replies: 3
Reply
Join Date: Jul 2006
Posts: 3
Reputation: Lbruce is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Lbruce Lbruce is offline Offline
Newbie Poster

date validation

  #1  
Aug 26th, 2006
Hello,

does anyone know how i can validate a date field using javascript. The field is a text field that accepts a date in the format yyyy-mm-dd.

i appreciate your help.
Thanks.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2006
Posts: 27
Reputation: anuradhu is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
anuradhu anuradhu is offline Offline
Light Poster

Re: date validation

  #2  
Aug 28th, 2006
find here the regular expression...
if you are still not able to figure it out..let me know.....

/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/
Reply With Quote  
Join Date: Jul 2007
Posts: 1
Reputation: sandhyamng is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sandhyamng sandhyamng is offline Offline
Newbie Poster

Re: date validation

  #3  
Jul 17th, 2007
hello can any one tell me how to validate date and time. i am selecting date and time from calendar window .then how should i validate it .
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: date validation

  #4  
Jul 17th, 2007
If you are selecting it from a Calendar widget, won't it be automatically validated? Of course you can't pick out '123/123/123' from it, can you?
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 9:13 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC