Solved

javascript: date question

Posted on 2010-09-02
4
310 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:grchap
4 Comments
 
LVL 13

Assisted Solution

by:ansudhindra
ansudhindra earned 50 total points
ID: 33588776
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
 

Author Comment

by:grchap
ID: 33589888
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
 
LVL 29

Expert Comment

by:Badotz
ID: 33592485
Well, "spiffycal.js" sounds like a JavaScript file, so I'd roll up my sleeves if I were you, and go get dirty ;-)
0
 
LVL 22

Accepted Solution

by:
kadaba earned 450 total points
ID: 33594396
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

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use embargo Date/time in php 29 36
Html5 Index on a table 7 26
Can't find PHP files on account that has WordPress 3 25
Simple Total function not working 8 30
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question