The Calendar is implemented in
calendar.ts (147 lines) and launched from the front panel Clock icon or Application Manager.Opening Calendar
There are three ways to access the Calendar:- Front Panel
- Application Manager
- Keyboard Shortcut
Click the Clock icon in the front panel to open the Calendar window.
Interface Overview
The Calendar window displays:Header
Month/year display with previous/next navigation buttons
Weekday Labels
Su, Mo, Tu, We, Th, Fr, Sa labels
Calendar Grid
Days of the month in a 7-column grid layout
Status Bar
Shows current date: “Today: DD/MM/YYYY”
Navigation
Month Navigation
Navigate between months using the header controls:- Previous Month: Click the left arrow button with previous icon
- Next Month: Click the right arrow button with right icon
- Current Month: Displays in header as “Month YYYY” (e.g., “March 2026”)
The calendar maintains your viewing position as you navigate. The status bar always shows today’s actual date for reference.
Visual Indicators
Today Highlighting
Today Highlighting
The current day is automatically highlighted with the
.today CSS class when viewing the current month. This makes it easy to identify today’s date at a glance.Implementation: calendar.ts:82-84Empty Cells
Empty Cells
Days before the first of the month appear as empty cells with the
.empty class, properly aligning the calendar grid to start on the correct weekday.Padding Logic: calendar.ts:68-72Features
Month Rendering
The calendar dynamically renders based on the selected month:- Calculate First Day: Determines which weekday the month starts on
- Days in Month: Calculates total days (28-31 depending on month/year)
- Grid Layout: Creates proper alignment with empty cells for padding
- Today Detection: Highlights current day when viewing current month
Window Management
The Calendar window includes:- Non-Maximizable: The
disableMaximize={true}attribute prevents maximizing (fixed size) - Minimizable: Can be minimized to the panel
- Draggable: Move the window by dragging the titlebar
- Audio Feedback: Plays window open/close sounds via AudioManager
calendar.ts:95-126
Implementation Details
CalendarManager
The Calendar is managed by theCalendarManager singleton exported from calendar.ts:
init()
Initializes the calendar, binds event handlers, and renders the current month
render()
Renders the calendar grid for the currently selected month
open()
Opens and centers the calendar window
close()
Closes the calendar window
toggle()
Toggles calendar visibility (open if closed, close if open)
changeMonth()
Changes displayed month by delta (+1 for next, -1 for previous)
Month Array
Defined in:calendar.ts:13-26
State Management
- currentDate:
Dateobject tracking the displayed month/year - initialized: Boolean flag preventing duplicate initialization
Usage Tips
Quick Date Reference
Keep the Calendar open in a separate workspace for quick date reference while working in other applications.
Keyboard Shortcuts
The Calendar primarily uses mouse interactions:| Action | Method |
|---|---|
| Previous Month | Click left arrow button |
| Next Month | Click right arrow button |
| Close Window | Click X button or Ctrl+W (window close) |
| Minimize | Click minimize button |
While there’s no dedicated keyboard shortcut to open the Calendar, you can use standard window management shortcuts (
Ctrl+W to close, Ctrl+M to minimize) once the window is focused.
