Solved

javascript: date question

Posted on 2010-09-02
4
307 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Joomla Website Malfunction 9 48
Form submit issue 11 52
grab and show facebook pages event calendars 6 40
Asp.net mvc 5 5 15
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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 …

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now