The calendar you linked to is most likely this one:
http://www.dynarch.com/projects/calendar/
I’ve seen it before and it is a JS calendar but my personal favorite date picker is the jQuery UI datepicker. I know you said minimal JS, but the jQuery UI datepicker is ridiculously easy to use despite dropping a couple hundred KB on the page.
That said, if you want to roll some sort of server-side solution, that makes things a little more difficult. You may find the CalendarEvent class in:
http://barebonescms.com/documentation/webcron/
To be useful. It could be used like:
require_once "calendar_event.php";
$year = date("Y");
$month = date("m");
$cal = new CalendarEvent();
$currcal = $cal->GetCalendar($year, $month, true);
var_dump($currcal);
Then $currcal contains all the information you need to construct a calendar fairly easily in HTML. Here’s what the above code generates for October 2010 (this month):
array(10) {
[“success”]=>
bool(true)
[“year”]=>
string(4) “2010”
[“month”]=>
string(2) “10”
[“prevmonthnumdays”]=>
string(2) “30”
[“weekdays”]=>
array(7) {
[“sun”]=>
int(1)
[“mon”]=>
int(2)
[“tue”]=>
int(3)
[“wed”]=>
int(4)
[“thu”]=>
int(5)
[“fri”]=>
int(6)
[“sat”]=>
int(7)
}
[“firstweekdaypos”]=>
int(6)
[“numdays”]=>
string(2) “31”
[“numweeks”]=>
int(6)
[“nextmonthweekdaypos”]=>
int(2)
[“calendar”]=>
array(0) {
}
}
Calendars are almost always displayed using HTML tables. I would use ‘firstweekdaypos’ to determine how many empty cells to create for the first row. October 1 starts on Friday. Then, count off 31 days (‘numdays’) for the month being careful to close each ‘tr’ at the end of each week and starting another row if the last day of the month hasn’t been reached yet. Then fill out the last row with empty cells.
If you want to get really fancy, some calendars show greyed out days of the surrounding months. ‘prevmonthnumdays’ contains the number of days in September. Since Friday is the first day of October, Sunday would be Sept 26. Filling in remaining days after the current month is a lot easier. Instead of empty cells, just start counting at ‘1’ and go from there to the end of the row.
I still think the jQuery UI route is the best.