JRS: In article <ff**************************@posting.google.com >,
dated Mon, 16 Aug 2004 08:51:56, seen in news:comp.lang.javascript,
Nitin <ni**********@ubs.com> posted :
I have created function to check date and time.
One presumes that you are paid per yard of code; a much shorter date
(and time) validator can be found via the FAQ : see below.
Also see the recent thread here "Multiple Datepicker".
You can I think solve your perceived problem by validating onChange
rather than onBlur; but it would be better IMHO to validate when the
user signals that data entry is completed.
When posting code to News, it is your duty not to allow the system to
wrap your code lines - anyway, you indent in units which are too large
for convenience.
HTML should also be indented to show structure, if people are to be
expected to read it.
You seem to ask for the time in GMT; the date also should be in GMT;
then, for consistency, var longYear= now.getYear();
should probably use getUTCyear()
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.