views:

23

answers:

0

I want a calendar that shows the whole year starting from Jan-Dec regardless of what month today is.

At the moment, this will show the date from July 2010 to June 2011.

jQuery('.calendar').datepicker({
numberOfMonths: [3, 4],
stepMonths: 12
});

When I added showCurrentAtPos: <? echo date('n')-1 ?>, it seems to place the current month in the right place onLoad, however when I clicked on random dates, the datepicker will refresh and shift the month, which I suppose because 'current' is now changed from today's date to the one I clicked. But having read at the docs, I can't find any other way to show the calendar from Jan-Dec beside the showCurrentAtPos option.

Any solution?

Another question, how to change the background (or sort of a state) of the selected dates? I want to create a simple full year attendance calendar where if I click on it, it will change the background to green (present), another click will make it orange (half-day), and another click will make it red (absent). Any light on this would be much appreciated.

Cheers,
HC