Day should probably be last, not in the middle.

Blair

On 3/8/06, Andrew Scott <[EMAIL PROTECTED] > wrote:

Steve,

I had something similar but was using the setDate, setMonth etc and figured
out that the setMonth was the problem, but then I figured that I would try
your way and I have the comparison incorrect can you see anything wrong with
this

var newDate = new Date(theform.WeddingYear.value + "/" +
theform.WeddingDay.value + "/" + theform.WeddingMonth.value);
if ( newDate < Date() )
alert("We selected the past");
else
alert("We are in the future");



Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976

Quote:
...the myth of socialism is far stronger than the reality of capitalism.
That is because capitalism is not really an ism at all. It is what people do
if you leave them alone. - Arnold Beichmen, Hoover Institute Fellow
----------------------------------------------------------------------------
--------------------------

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com ] On Behalf
Of Steve Onnis
Sent: Wednesday, 8 March 2006 11:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: JS brain drain


var newDate = new Date(yearSelect + "/" + monthSelect + "/" + daySelect);

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com]On
Behalf Of Andrew Scott
Sent: Wednesday, March 08, 2006 10:18 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] JS brain drain




I am having a brain drain on this, so I know I have done this before but I
seem to be not getting anywhere.

I have 3 drop down fields, that I wish to concatenate and turn into a date
object to compare against the current date, I seem to be not getting the
date object part right can anyway show me or give an example please.



Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to