Type Calendar

type Calendar struct {

	// tabStop is the one day Tab reaches; arrows move among the others.

}

Calendar paints one source-owned month grid. It deliberately has no hidden navigation, locale, or date model; callers replace CalendarOptions when the visible month changes.

It paints no background of its own, like shadcn's Calendar inside a popover or card: the surface it sits on (the page, a Popover, a Card) shows through, so it never becomes a darker rectangle on a raised surface.

Constructors

BeginCalendar#

func BeginCalendar(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options CalendarOptions) Calendar

BeginCalendar prepares a deterministic seven-column month grid.

Methods

Bounds#

func (calendar Calendar) Bounds() ui.Rect

Bounds returns the normalized outer geometry. A missing height is derived from the number of caller-provided day cells.

DayBounds#

func (calendar Calendar) DayBounds(index int) ui.Rect

DayBounds returns the deterministic geometry for a display-order day index.

Paint#

func (calendar Calendar) Paint()

Paint emits the month caption, navigation, weekday labels, and day cells.