Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 4th, 2007, 03:26 AM
Authorized User
Join Date: Jul 2007
Location: chennai, Tamilnadu, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default date time validation

Hello sir,

How to Validate MM/DD/YYYY HH:MM:SS AM this format date value in javascript. I want to validate in cliend side. PLease help me

Ok Thankyou

Reply With Quote
  #2 (permalink)  
Old December 4th, 2007, 04:50 AM
Friend of Wrox
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

You can use Calendar object in java script.
Use the resources available at the following links


- Rakesh
Reply With Quote
  #3 (permalink)  
Old December 4th, 2007, 05:38 AM
Posts: n/a

If you have a "Today's Date" field in your form, u can use JavaScript for fill it for your visitors

something like this...

<form name="dform">
<input type="text" name="currentdate" size=11>


/*Current date in form credit:
JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!

var mydate=new Date()
var theyear=mydate.getYear()
if (theyear < 1000)
var theday=mydate.getDay()
var themonth=mydate.getMonth()+1
if (themonth<10)
var theday=mydate.getDate()
if (theday<10)

//////EDIT below three variable to customize the format of the date/////

var displayfirst=themonth
var displaysecond=theday
var displaythird=theyear




Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Time from Date/Time Navy1991_1 XSLT 2 June 3rd, 2008 12:03 PM
date and time in EST time zone anboss XSLT 1 May 21st, 2008 01:42 PM
Validation at Run Time nicesukhi Visual Studio 2005 0 July 20th, 2006 02:43 AM
comparing date/time fields on form validation Lucy Javascript How-To 1 June 20th, 2006 09:22 AM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM

All times are GMT -4. The time now is 01:50 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.