HighDots Forums  

Auto insert Date in form input field

Javascript JavaScript language (comp.lang.javascript)


Discuss Auto insert Date in form input field in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dwalker
 
Posts: n/a

Default Auto insert Date in form input field - 09-25-2003 , 12:47 PM






I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus. I've been playing around with this but
just can't seem to get it to work.

Any help would be appreciated.

Doug



Reply With Quote
  #2  
Old   
Dr John Stockton
 
Posts: n/a

Default Re: Auto insert Date in form input field - 09-26-2003 , 05:06 AM






JRS: In article <wRFcb.20144$jO.19590 (AT) bignews3 (DOT) bellsouth.net>, seen in
news:comp.lang.javascript, Dwalker <dl_walker (AT) hotmail (DOT) com> posted at
Thu, 25 Sep 2003 13:47:05 :-

Quote:
I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus. I've been playing around with this but
just can't seem to get it to work.
That format should nor be used on the World-Wide Web; since only a few
countries use it, it is generally misleading (as is dd/mm/yyyy, of
course).

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.


Reply With Quote
  #3  
Old   
Lee
 
Posts: n/a

Default Re: Auto insert Date in form input field - 09-26-2003 , 12:26 PM



Dr John Stockton said:
Quote:
JRS: In article <wRFcb.20144$jO.19590 (AT) bignews3 (DOT) bellsouth.net>, seen in
news:comp.lang.javascript, Dwalker <dl_walker (AT) hotmail (DOT) com> posted at
Thu, 25 Sep 2003 13:47:05 :-

I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus. I've been playing around with this but
just can't seem to get it to work.

That format should nor be used on the World-Wide Web; since only a few
countries use it, it is generally misleading (as is dd/mm/yyyy, of
course).
Curiosity: How widely accepted is yyyy-mm-dd out there in the Rest of
The World? In addition to software development, I've been using it on
bank drafts and forms for several months, but have never spotted it in
the wild (USA-AZ).



Reply With Quote
  #4  
Old   
Ivo
 
Posts: n/a

Default Re: Auto insert Date in form input field - 09-26-2003 , 12:43 PM




"Dr John Stockton" <spam (AT) merlyn (DOT) demon.co.uk> wrote

Quote:
JRS: In article <wRFcb.20144$jO.19590 (AT) bignews3 (DOT) bellsouth.net>, seen in
news:comp.lang.javascript, Dwalker <dl_walker (AT) hotmail (DOT) com> posted at
Thu, 25 Sep 2003 13:47:05 :-

I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus. I've been playing around with this but
just can't seem to get it to work.

That format should nor be used on the World-Wide Web; since only a few
countries use it, it is generally misleading (as is dd/mm/yyyy, of
course).
Things became confusing only after the colonists in the New World went
looking for an identity in spelling anomalies.
No 'countries' that I know of use the format yyyy/mm/dd although that is the
one which sorts alphabetically and chronologically simultaneously. Or would
you suggest using the Julian Day Number?
Ivo




Reply With Quote
  #5  
Old   
Dr John Stockton
 
Posts: n/a

Default Re: Auto insert Date in form input field - 09-28-2003 , 06:53 AM



JRS: In article <bl1sru02aj2 (AT) drn (DOT) newsguy.com>, seen in
news:comp.lang.javascript, Lee <REM0VElbspamtrap (AT) cox (DOT) net> posted at Fri,
26 Sep 2003 10:26:22 :-
Quote:
Dr John Stockton said:

JRS: In article <wRFcb.20144$jO.19590 (AT) bignews3 (DOT) bellsouth.net>, seen in
news:comp.lang.javascript, Dwalker <dl_walker (AT) hotmail (DOT) com> posted at
Thu, 25 Sep 2003 13:47:05 :-

I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus. I've been playing around with this but
just can't seem to get it to work.

That format should nor be used on the World-Wide Web; since only a few
countries use it, it is generally misleading (as is dd/mm/yyyy, of
course).

Curiosity: How widely accepted is yyyy-mm-dd out there in the Rest of
The World? In addition to software development, I've been using it on
bank drafts and forms for several months, but have never spotted it in
the wild (USA-AZ).
It is, I have been lead to understand, a US Federal Standard.
USA Standard: ANSI X3.30-1985(R1991), FIPS PUB 4-1, 4-2.
if you indulge in foreign travel, it is also
Canada: CAN/CSA-Z234.5-89. (Z234-4 ?)
and many others.


It matters not, however, how widely it is used, but how widely it is
understood correctly.

My Bank have remarked (audibly) on seeing it, but have understood it and
accepted it without demur.

A date in MM/DD/YYYY, such as Jan 4th, being written as 01/04/2004, will
be understood throughout Europe as meaning April Fools Day. The date of
Remembrance Sunday, written demotically in the UK as 09/11/2003, will be
misunderstood by Americans.

But everyone can understand 2004/04/11 as being the coming Easter
Sunday, given an adequate 2004 diary.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.


Reply With Quote
  #6  
Old   
Dr John Stockton
 
Posts: n/a

Default Re: Auto insert Date in form input field - 09-28-2003 , 07:10 AM



JRS: In article <3f747aca$0$427$1b62eedf (AT) news (DOT) wanadoo.nl>, seen in
news:comp.lang.javascript, Ivo <no (AT) thank (DOT) you> posted at Fri, 26 Sep 2003
19:43:42 :-
Quote:
"Dr John Stockton" <spam (AT) merlyn (DOT) demon.co.uk> wrote in message
news:ro82WVGt+Ad$Ewq6 (AT) merlyn (DOT) demon.co.uk...
JRS: In article <wRFcb.20144$jO.19590 (AT) bignews3 (DOT) bellsouth.net>, seen in
news:comp.lang.javascript, Dwalker <dl_walker (AT) hotmail (DOT) com> posted at
Thu, 25 Sep 2003 13:47:05 :-

I just want to enter today's date in a text input box with the format
mm/dd/yyyy when it receives focus.

That format should nor be used on the World-Wide Web; since only a few
countries use it, it is generally misleading (as is dd/mm/yyyy, of
course).

Things became confusing only after the colonists in the New World went
looking for an identity in spelling anomalies.
Any responsibility that the UK may have for this must be shared in part
with the country that founded New Amsterdam. It is one thing, I
suspect, for which the French need not be blamed.

Quote:
No 'countries' that I know of use the format yyyy/mm/dd although that is the
one which sorts alphabetically and chronologically simultaneously.
I believe Japan and China use it routinely. MSDOS 5 believes that YYYY-
MM-DD is also used in French Canada, Hungary, Czechoslovakia, Sweden,
Yugoslavia, Poland.

Quote:
Or would
you suggest using the Julian Day Number?
No, not least because the Julian Day Number does not define a Civil
Date. Modified JD defines a UK Civil Date (ignoring Summer Time); and
Chronological JD & CMJD define a civil date anywhere.

For more, see via below.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.