Calendars with Movable Type 3.2
With v3.2 of Movable Type, Six Apart removed the calendar from the sidebar of the default templates citing rebuild times as the reason. They did post the code that was used in previous versions. However, many users found that simply pasting the code in didn't yield a properly formatted calendar. So after a little digging around, I've come up with the following code which will create a calendar that will be correctly formatted and fit in with your stylesheet. Simply copy the code and put it in your sidebar - a good location would be just above <div class="module-search module">
<div class="module-calendar module">
<h2 class="module-header"><$MTDate format="%B %Y"$></h2>
<div class="module-content">
<table summary="Monthly calendar with links to each day's posts">
<tr>
<th abbr="Sunday">Sun</th>
<th abbr="Monday">Mon</th>
<th abbr="Tuesday">Tue</th>
<th abbr="Wednesday">Wed</th>
<th abbr="Thursday">Thu</th>
<th abbr="Friday">Fri</th>
<th abbr="Saturday">Sat</th>
</tr>
<MTCalendar>
<MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
<td>
<MTCalendarIfEntries>
<MTEntries lastn="1">
<a href="<$MTEntryPermalink$>"><$MTCalendarDay$></a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<$MTCalendarDay$>
</MTCalendarIfNoEntries>
<MTCalendarIfBlank> </MTCalendarIfBlank></td>
<MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
</MTCalendar>
</table>
</div>
</div>

PilleRiin said:
on Feb 14, 2006 2:23 PM | Reply
Hello, is there a way to start calendar week at Monday instead of Sunday? I just cannot find the way, have tried with css, index template and also looked in MT code - but hopelessly (i'm not any code-writer though). I and most my readres cannot get used to start week with Sunday. Brgds, Pilleriin
Frank Schofield said:
on Feb 18, 2006 11:15 PM | Reply
Trying to work out some basics. Where does one find the sidebar to insert this code..
Tks
RJ said:
on Feb 22, 2006 8:25 AM | Reply
Sidebar is actually the narrow column on the left or the right - usually the right. for an example if you look at my blog, it is the narrower column which contains all the links to the categories, entries, archives blogrolls etc.
in your main index template of MT3.2(?) you will see this after the following piece of code.
<strong> </strong>i am no expert, but hope this helps.
RJ said:
on Feb 22, 2006 8:28 AM | Reply
The code did not show in my earlier comment! Sorry. Goes to show how much I know about code!!!!
div id="beta" div id="beta-inner" class="pkg"
The Old Hacker said:
on Mar 9, 2006 2:38 PM | Reply
In index.html, use the following code block instead of the supplied:
<tr>
<th abbr="Monday">Mo</th>
<th abbr="Tuesday">Tu</th>
<th abbr="Wednesday">We</th>
<th abbr="Thursday">Th</th>
<th abbr="Friday">Fr</th>
<th abbr="Saturday">Sa</th>
<th abbr="Sunday">Su</th>
</tr>
Carrie said:
on Jul 28, 2006 7:49 PM | Reply
Thank you, this was super helpful!
Paul said:
on Oct 5, 2006 8:59 AM | Reply
I'm making use of a few things: The CustomFields module, with which I am using a Custom Date field. Then, I'm making use of the calendar code above to display my Events, by adding the 'tag="Events"' for it to look like this:
My problem is, I'd like to display the Events Calendar based upon the event date (custom field) rather than the posted date. how do I do this? Any insight wuld be greatly appreciated.
You can see what I'm doing in this test environment http://www.textchange.ca
Thanks!