In one of my projects I needed a simple javascript calendar. But of the existing jQuery plugins, only one “almost” met my requirements. I decided to write my own plugin - try pen calendarLite plugin .
Features calendarLite:
the calendar is designed for permanent display on the page (not as different date picker)
month navigation using the “Forward” and “Back” buttons
flexible settings (see options below)
For the plugin to work, as usual you need to connect the jquery and the plugin itself. Consider the main features of this plugin.
')
Setting the link format
You can set the link format (for anchor), for example for such links: http://snowcore.net/events/29–05–2009 This can be done using the linkFormat option
To click on a cell, you can specify your handlers. Callback function accepts one value - the torn-out date. The onSelect option allows you to do this.
The additional dateFormat option allows you to set the date format that will be passed to the callback function. The default dateFormat is: '{% dd}. {% Mm}. {% Yyyy}'
$ ( '#cCallback' ) . calendarLite ( {
dateFormat : '{% yyyy} - {% m} - {% d}' ,
onSelect : function ( date ) {
alert ( date ) ;
returnfalse ;
}
} ) ;
Appearance customization
Using other options (and styles) you can customize the appearance of the calendar:
showYear - if set to true, then the year is shown at the top
prevArrow and nextArrow - symbols for the 'Previous' and 'Next' buttons
months and days - the names of the months and days (for multilingual)