Webdesign/Fcp.Calendar

Fcp.Calendar is a tiny, self-contained Javascript library. It displays a monthly Gregorian calendar. An event is triggered every time the user clicks on a date.

This software is unmaitained and unsupported. Provided as-is. Use at your own risk.

Demo

Download

Fcp.Calendar 1.1 is subject to the MIT license.

Features

Compatibility

Tested on Firefox/Seamonkey, Opera 9+, Konqueror 3.2+ and Internet Explorer 6; it works fine on these.

Bugs

There is a bug which makes the calendar skip a month when going forward first time from January. It's no big deal, but I couldn't find the cause.

Frequently asked question

(just one - thanks, Michael)

Q. How do I get the date in ISO format (e.g. 2006-12-21)?
A. Run your Javascript Date() instance through the following function:
function dateToISO(date) {
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    if (month < 10) month = "0" + month;
    if (day < 10) day = "0" + day;
    return year + "-" + month + "-" + day;
}
(syntax highlighting courtesy of JUSH)

Last modified: Thu 16 01 2014, 19:16:16 UTC