Calendar
Calendars display dates and events in familiar month-grid form. The CTD Learns App has three calendar variants for different contexts: a full-page calendar on the class schedule page (large cells with event markers), a medium calendar in the mentor dashboard sidebar (smaller cells), and a compact mini-calendar in the admin sidebar (no nav, display only). All three are built on MUI's DateCalendar with separate theme creator functions per variant. Event markers are small blue dots under days that have scheduled events.
Overview
Full-size calendar on the class schedule page. Large cells with event markers.
Medium-size calendar in the mentor dashboard sidebar. Slightly smaller cells.
Compact mini-calendar in the admin sidebar. Smallest cells, no navigation arrows.
Page Calendar
Full-size calendar used on the class schedule page. Uses calendarPageStyle theme function.
Min width
504px (31.5rem)Cell size
63px × 63px (3.938rem)Padding
30px (1.875rem)Border
0.5px solidgray200Border radius
10pxradiusLgHeader font
22px700 weightDay font
14pxSelected day bg
#309FDE80Outside month bg
#F1F2F2Event marker
8px circleinfo (#3B82F6)Theme function
calendarPageStyle(theme)Mentor Dashboard Calendar
Medium calendar for the mentor dashboard. Uses mentorDashboardCalendarPageStyle theme function.
April 2026
Width
96% of containerCell size
39px × 39px (2.44rem)Day font
8.7px (0.54rem)Event marker
4px circleinfoTheme function
mentorDashboardCalendarPageStyle(theme)Admin Sidebar Calendar
Compact mini-calendar in the admin sidebar. Navigation arrows and view switcher are hidden. Uses adminPageCalendarStyle theme function.
April 2026
Width
256px (16rem)Cell size
auto (small)Day font
8.7px (0.542rem)Header font
15px400 weightNav arrows
hiddenView switcher
hiddenMonth nav
pointer-events: none (display only)Theme function
adminPageCalendarStyle(theme)Event Markers
Two marker sizes are exported for use in calendar day cells to indicate events on a given date.
4 × 4px
eventMarkStyleSmallCalendar8 × 8px
eventMarkStyleBigCalendarCode
import { calendarPageStyle } from '@/theme/theme';
import { useTheme } from '@mui/material/styles';
import { ThemeProvider } from '@mui/material/styles';
import { DateCalendar } from '@mui/x-date-pickers/DateCalendar';
function ClassCalendar() {
const theme = useTheme();
const calendarTheme = calendarPageStyle(theme);
return (
<ThemeProvider theme={calendarTheme}>
<DateCalendar
renderDay={(day, _, DayProps) => (
<Box sx={{ position: 'relative' }}>
<PickersDay {...DayProps} />
{hasEvent(day) && (
<Box sx={eventMarkStyleBigCalendar} />
)}
</Box>
)}
/>
</ThemeProvider>
);
}// Each calendar variant exports a theme creator function
// that takes the current theme and returns a new theme
// with component overrides specific to that context:
export const calendarPageStyle = (theme) =>
createTheme({
components: {
MuiDateCalendar: { ... },
MuiPickersDay: { ... },
MuiPickersCalendarHeader: { ... },
MuiDayCalendar: { ... },
},
});
// Usage: wrap DateCalendar in a ThemeProvider
// with the generated theme for that variant.