javascript: date question

Hi all,

I use spiffycal.js for date picker. It works great for the date range in 2005 - 2015.
I have a date say 15-AUG-38 then the calendar goes to 2005 year rather than 2038.

Any thoughts on this?
grchapAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kadabaConnect With a Mentor Commented:
I just had a look here

http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_48.html

I tried your use case: but I got 15-AUG-38 formatted to 15-AUG-1938

I saw this condition mentioned in the js.

if (lYear<=20) {
            year = 2000 + lYear;
}
else if (lYear >=21 && lYear<=99) {
            year = 1900 + lYear;    
}

0
 
ansudhindraConnect With a Mentor Commented:
Hi, I dont know about spiffycal.js calendar but here is the light DHML calendar and can support more date ranges than spiffycal.js.
http://www.ajaxdaddy.com/web20/swazzcalendar/
0
 
grchapAuthor Commented:
But the thing is I have used spiffycal.js in many applications.
I cannot goback and change everywhere. You know what I mean.

Thanks for the response, though.

0
 
BadotzCommented:
Well, "spiffycal.js" sounds like a JavaScript file, so I'd roll up my sleeves if I were you, and go get dirty ;-)
0
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.