Netscape+JavaScript+y2k ???

i'm using a javascript that is filling a text-field with a date when the user clicks on a day in the calendar displayed ! all is working fine as long as the user works with IE. using Netscape and clicking on a date in the next millenium, let's say 10th. Jan. 2000 he will get 10th. Jan of 100 !!!
Anybody knows a workaround ????
Who is Participating?
aikonConnect With a Mentor Commented:
You are on the right way, tt happens too on JDK 1.0.2.

how does the javascript look like?
master0084Author Commented:
i tried to post the sourcecode but it ended in an internal server error ! no way ...
let me describe it:
1. create date object using :
 new Date(yearfromcalendar, monthfromcalendar, dayfromcalendar)
2. filling the fields value with the date-object
master0084Author Commented:
the error seems to occur while a try to get the year out of the date using:
The best workaround seems to be a quick math test -- if the year is less than 1000, assume that it's an error and add 1900 to the number. This won't work if your site actually anticipates years before 1000, of course.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.