JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 25th, 2005, 04:33 AM
tkngang tkngang is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 6 tkngang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 57 sec
Reputation Power: 0
date verification

i m using the .js file to do all the validate functions.

<script language="JavaScript" src="nnn.js" type="text/javascript">

now i face the problem in validating the date.

<tr>
<td align="right">date</td>
<td><INPUT TYPE="text" NAME="txtdate"
onchange="js function()">
</td>
</tr>


my problem is how to write the function to verify date in my nnn.js file.
thx.

Reply With Quote
  #2  
Old August 25th, 2005, 07:26 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
How do you want your date to look?

05/08/31
2005/08/31
31/08/2005
08/31/2005
August 31, 2005
Wednesday, August 31, 2005
2005.08.31
08-31-05

[and so on, and so on]

My point being, there are a million ways to write a date.
The easiest way is to decide on one convention (perhaps localized to your audience) and encourage your users to enter the date that way.
Another common workaround is to use a datepicker script, this way the user doesn't manually enter a date.

Reply With Quote
  #3  
Old August 25th, 2005, 09:03 PM
tkngang tkngang is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 6 tkngang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 57 sec
Reputation Power: 0
verify date

the format of my date is dd/mm/yyyy.
is it possible to get the datepicker script in that format (dd/mm/yyyy)?

another question is , if i want user to key in the date (dd/mm/yyyy) manually, how to verify the date(with the function code in my .js file, seperately from the html) and set the format to dd/mm/yyy in the textfield(with / /).


thanks.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > date verification


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway